From f9a4ee4e998f5f113565a93802c041108e9a180d Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Wed, 2 Apr 2014 14:53:10 -0400 Subject: now ran generate without ger --- .../remote_usernames_controller_test.rb | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 test/controllers/remote_usernames_controller_test.rb (limited to 'test/controllers/remote_usernames_controller_test.rb') diff --git a/test/controllers/remote_usernames_controller_test.rb b/test/controllers/remote_usernames_controller_test.rb new file mode 100644 index 0000000..ff6a91d --- /dev/null +++ b/test/controllers/remote_usernames_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class RemoteUsernamesControllerTest < ActionController::TestCase + setup do + @remote_username = remote_usernames(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:remote_usernames) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create remote_username" do + assert_difference('RemoteUsername.count') do + post :create, remote_username: { game_id: @remote_username.game_id, user_id: @remote_username.user_id, user_name: @remote_username.user_name } + end + + assert_redirected_to remote_username_path(assigns(:remote_username)) + end + + test "should show remote_username" do + get :show, id: @remote_username + assert_response :success + end + + test "should get edit" do + get :edit, id: @remote_username + assert_response :success + end + + test "should update remote_username" do + patch :update, id: @remote_username, remote_username: { game_id: @remote_username.game_id, user_id: @remote_username.user_id, user_name: @remote_username.user_name } + assert_redirected_to remote_username_path(assigns(:remote_username)) + end + + test "should destroy remote_username" do + assert_difference('RemoteUsername.count', -1) do + delete :destroy, id: @remote_username + end + + assert_redirected_to remote_usernames_path + end +end -- cgit v1.2.3-2-g168b