diff options
| author | mo khan <mo@mokhan.ca> | 2021-04-30 21:38:37 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2021-04-30 21:38:37 -0600 |
| commit | b85d5d43855501c9866c1ab4442aced3d4250664 (patch) | |
| tree | 0e6fc8a8381732bc9c64e877d36ccac207660ae5 /test/controllers | |
| parent | f24dfbde3eafcc9be39a7c246263d49b9a12fb3a (diff) | |
feat: generate users scaffold
Diffstat (limited to 'test/controllers')
| -rw-r--r-- | test/controllers/users_controller_test.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb new file mode 100644 index 0000000..cc871bc --- /dev/null +++ b/test/controllers/users_controller_test.rb @@ -0,0 +1,28 @@ +require "test_helper" + +class UsersControllerTest < ActionDispatch::IntegrationTest + setup do + @user = users(:billie) + end + + test "should get index" do + get users_url + assert_response :success + end + + test "should get new" do + get new_user_url + assert_response :success + end + + test "should create user" do + post users_url, params: { user: { handle: 'wycats' } } + + assert_redirected_to user_url(User.last) + end + + test "should show user" do + get user_url(@user) + assert_response :success + end +end |
