?
This commit is contained in:
parent
e253a71fc4
commit
2696e1f184
33 changed files with 443 additions and 0 deletions
7
test/controllers/discord_users_controller_test.rb
Normal file
7
test/controllers/discord_users_controller_test.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
require "test_helper"
|
||||
|
||||
class DiscordUsersControllerTest < ActionDispatch::IntegrationTest
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
7
test/controllers/sessions_controller_test.rb
Normal file
7
test/controllers/sessions_controller_test.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
require "test_helper"
|
||||
|
||||
class SessionsControllerTest < ActionDispatch::IntegrationTest
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
48
test/controllers/users_controller_test.rb
Normal file
48
test/controllers/users_controller_test.rb
Normal file
|
@ -0,0 +1,48 @@
|
|||
require "test_helper"
|
||||
|
||||
class UsersControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
@user = users(:one)
|
||||
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
|
||||
assert_difference("User.count") do
|
||||
post users_url, params: { user: { border: @user.border, provider: @user.provider, uid: @user.uid } }
|
||||
end
|
||||
|
||||
assert_redirected_to user_url(User.last)
|
||||
end
|
||||
|
||||
test "should show user" do
|
||||
get user_url(@user)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get edit_user_url(@user)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should update user" do
|
||||
patch user_url(@user), params: { user: { border: @user.border, provider: @user.provider, uid: @user.uid } }
|
||||
assert_redirected_to user_url(@user)
|
||||
end
|
||||
|
||||
test "should destroy user" do
|
||||
assert_difference("User.count", -1) do
|
||||
delete user_url(@user)
|
||||
end
|
||||
|
||||
assert_redirected_to users_url
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue