{"action":"created","issue":{"url":"https://api.github.com/repos/santigarcor/laratrust/issues/5","repository_url":"https://api.github.com/repos/santigarcor/laratrust","labels_url":"https://api.github.com/repos/santigarcor/laratrust/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/santigarcor/laratrust/issues/5/comments","events_url":"https://api.github.com/repos/santigarcor/laratrust/issues/5/events","html_url":"https://github.com/santigarcor/laratrust/issues/5","id":160409584,"number":5,"title":"Integration testing","user":{"login":"KKSzymanowski","id":13980973,"avatar_url":"https://avatars.githubusercontent.com/u/13980973?v=3","gravatar_id":"","url":"https://api.github.com/users/KKSzymanowski","html_url":"https://github.com/KKSzymanowski","followers_url":"https://api.github.com/users/KKSzymanowski/followers","following_url":"https://api.github.com/users/KKSzymanowski/following{/other_user}","gists_url":"https://api.github.com/users/KKSzymanowski/gists{/gist_id}","starred_url":"https://api.github.com/users/KKSzymanowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KKSzymanowski/subscriptions","organizations_url":"https://api.github.com/users/KKSzymanowski/orgs","repos_url":"https://api.github.com/users/KKSzymanowski/repos","events_url":"https://api.github.com/users/KKSzymanowski/events{/privacy}","received_events_url":"https://api.github.com/users/KKSzymanowski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-15T12:26:33Z","updated_at":"2016-06-15T13:47:20Z","closed_at":null,"body":"I have an idea for doing some integration tests.\r\n\r\nCreate a Laravel app, using Laratrust and write tests there.\r\n\r\nWhat I mean is:\r\n1. Setup an sqlite database with all the needed scaffolding\r\n2. Fill it with several users, with different roles and permissions\r\n3. Write some routes and views\r\n4. Write simple tests for all of this like\r\n```\r\nAuth::loginUsingId(1);\r\n$this->visit('/permission/1')\r\n     ->see('You are authorized to see this');\r\n\r\nAuth::loginUsingId(2);\r\n$this->visit('/permission/1')\r\n     ->see('You are not authorized to see this');\r\n\r\n// or\r\n\r\n$this->visit('/permission/1')\r\n     ->assertRedirectedTo('/', ['message' => 'Unauthorized access']);\r\n```\r\nand so on.\r\n\r\nThis app will pull in `santigarcor/laratrust: \"master\"` so every time there is a change in Laratrust you would click \"Restart Build\" in Travis for this app to see if it all still works.\r\n\r\nWhat do you think about this?\r\nDo you have better ideas?\r\n\r\nI also think it would be great for regression tests eg. user says \"When I do this and that everything crashes\" we would be able to reproduce this error, write tests to fail it, fix the error and see tests turn green(just like Jeffrey explains [here](https://laracasts.com/series/phpunit-testing-in-laravel/episodes/8))"},"comment":{"url":"https://api.github.com/repos/santigarcor/laratrust/issues/comments/226191991","html_url":"https://github.com/santigarcor/laratrust/issues/5#issuecomment-226191991","issue_url":"https://api.github.com/repos/santigarcor/laratrust/issues/5","id":226191991,"user":{"login":"KKSzymanowski","id":13980973,"avatar_url":"https://avatars.githubusercontent.com/u/13980973?v=3","gravatar_id":"","url":"https://api.github.com/users/KKSzymanowski","html_url":"https://github.com/KKSzymanowski","followers_url":"https://api.github.com/users/KKSzymanowski/followers","following_url":"https://api.github.com/users/KKSzymanowski/following{/other_user}","gists_url":"https://api.github.com/users/KKSzymanowski/gists{/gist_id}","starred_url":"https://api.github.com/users/KKSzymanowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KKSzymanowski/subscriptions","organizations_url":"https://api.github.com/users/KKSzymanowski/orgs","repos_url":"https://api.github.com/users/KKSzymanowski/repos","events_url":"https://api.github.com/users/KKSzymanowski/events{/privacy}","received_events_url":"https://api.github.com/users/KKSzymanowski/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T13:47:20Z","updated_at":"2016-06-15T13:47:20Z","body":"Yep, another package would be an overkill. If we do the the app in tests folder, the travis part doesn't matter anymore. I can fiddle with that if you want and see if it's possible."}}
{"actor":{"display_login":"KKSzymanowski"}}