diff options
author | shumakl <shumakl@purdue.edu> | 2014-04-03 12:32:48 -0400 |
---|---|---|
committer | shumakl <shumakl@purdue.edu> | 2014-04-03 12:32:48 -0400 |
commit | 4015a27f66eafee66137bc27a76843bd48139772 (patch) | |
tree | f2e4347606fa9bdec73ede85d562a7b891c85df2 /test/controllers/remote_usernames_controller_test.rb | |
parent | 8d5325cd6019b784ba2da66d19c41daaadbc19e0 (diff) | |
parent | 8e3e46b7951120f1ec34949d607a7672ad03f820 (diff) |
Merge branch 'clean2'
Conflicts:
app/controllers/alerts_controller.rb
app/controllers/application_controller.rb
app/controllers/matches_controller.rb
app/controllers/servers_controller.rb
app/controllers/sessions_controller.rb
app/controllers/tournaments_controller.rb
app/controllers/users_controller.rb
app/models/match.rb
app/models/team.rb
app/models/tournament.rb
app/views/sessions/_form.html.erb
app/views/sessions/index.html.erb
app/views/sessions/index.json.jbuilder
app/views/sessions/show.html.erb
app/views/sessions/show.json.jbuilder
app/views/tournaments/index.html.erb
config/routes.rb
generate.sh
Diffstat (limited to 'test/controllers/remote_usernames_controller_test.rb')
-rw-r--r-- | test/controllers/remote_usernames_controller_test.rb | 49 |
1 files changed, 49 insertions, 0 deletions
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 |