diff --git a/test/controllers/contests_controller_test.rb b/test/controllers/contests_controller_test.rb index 09ab9ae..a5edf2b 100644 --- a/test/controllers/contests_controller_test.rb +++ b/test/controllers/contests_controller_test.rb @@ -1,8 +1,4 @@ require "test_helper" class ContestsControllerTest < ActionDispatch::IntegrationTest - test "should get create" do - get contests_create_url - assert_response :success - end end diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 6ed33da..ef22bbf 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -1,28 +1,4 @@ require "test_helper" class UsersControllerTest < ActionDispatch::IntegrationTest - test "should get index" do - get users_index_url - assert_response :success - end - - test "should get edit" do - get users_edit_url - assert_response :success - end - - test "should get show" do - get users_show_url - assert_response :success - end - - test "should get new" do - get users_new_url - assert_response :success - end - - test "should get destroy" do - get users_destroy_url - assert_response :success - end end diff --git a/test/fixtures/completions.yml b/test/fixtures/completions.yml index fdd6c8d..d365f1e 100644 --- a/test/fixtures/completions.yml +++ b/test/fixtures/completions.yml @@ -24,12 +24,14 @@ # contestant_id (contestant_id => contestants.id) # puzzle_id (puzzle_id => puzzles.id) # -one: +completion_one: time_seconds: 1 - contestant: one - puzzle: one + contestant: team_one + puzzle: puzzle_one + contest: team_contest -two: - time_seconds: 1 - contestant: two - puzzle: two +completion_two: + time_seconds: 2 + contestant: solo_one + puzzle: puzzle_two + contest: solo_contest diff --git a/test/fixtures/contestants.yml b/test/fixtures/contestants.yml index fc869a4..5570362 100644 --- a/test/fixtures/contestants.yml +++ b/test/fixtures/contestants.yml @@ -19,12 +19,14 @@ # # contest_id (contest_id => contests.id) # -one: - name: MyString - email: MyString - contest: one +team_one: + name: Team one + contest: team_contest -two: - name: MyString - email: MyString - contest: two +team_two: + name: Team two + contest: team_contest + +solo_one: + name: Solo one + contest: solo_contest diff --git a/test/fixtures/contests.yml b/test/fixtures/contests.yml index df508c3..4f48d0c 100644 --- a/test/fixtures/contests.yml +++ b/test/fixtures/contests.yml @@ -21,10 +21,15 @@ # # user_id (user_id => users.id) # -one: - name: MyString - user: one -two: - name: MyString - user: two +team_contest: + name: Team contest + user: user + slug: team-contest + team: true + +solo_contest: + name: Solo contest + user: user + slug: solo-contest + team: false diff --git a/test/fixtures/puzzles.yml b/test/fixtures/puzzles.yml index 6726a83..289a99e 100644 --- a/test/fixtures/puzzles.yml +++ b/test/fixtures/puzzles.yml @@ -19,8 +19,12 @@ # # contest_id (contest_id => contests.id) # -one: - name: MyString +puzzle_one: + name: Puzzle one + brand: Brand one + contest: team_contest -two: - name: MyString +puzzle_two: + name: Puzzle two + brand: Brand two + contest: solo_contest diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index da7e35e..882ab7d 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -1,4 +1,5 @@ -<% password_digest = BCrypt::Password.create("password") %> +<% admin_password_digest = BCrypt::Password.create("admin") %> +<% user_password_digest = BCrypt::Password.create("user") %> # == Schema Information # @@ -16,10 +17,14 @@ # # index_users_on_email_address (email_address) UNIQUE # -one: - email_address: one@example.com - password_digest: <%= password_digest %> +admin_user: + email_address: admin@admin.org + password_digest: <%= admin_password_digest %> + username: admin + admin: true -two: - email_address: two@example.com - password_digest: <%= password_digest %> +user: + email_address: user@user.org + password_digest: <%= user_password_digest %> + username: user + admin: false diff --git a/test/models/user_test.rb b/test/models/user_test.rb index bef68e8..b468c81 100644 --- a/test/models/user_test.rb +++ b/test/models/user_test.rb @@ -17,7 +17,7 @@ require "test_helper" class UserTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end + test "the truth" do + assert true + end end