Initialize tests and make them pass
This commit is contained in:
parent
f8bfb020bc
commit
c98caeea92
@ -1,8 +1,4 @@
|
|||||||
require "test_helper"
|
require "test_helper"
|
||||||
|
|
||||||
class ContestsControllerTest < ActionDispatch::IntegrationTest
|
class ContestsControllerTest < ActionDispatch::IntegrationTest
|
||||||
test "should get create" do
|
|
||||||
get contests_create_url
|
|
||||||
assert_response :success
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@ -1,28 +1,4 @@
|
|||||||
require "test_helper"
|
require "test_helper"
|
||||||
|
|
||||||
class UsersControllerTest < ActionDispatch::IntegrationTest
|
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
|
end
|
||||||
|
16
test/fixtures/completions.yml
vendored
16
test/fixtures/completions.yml
vendored
@ -24,12 +24,14 @@
|
|||||||
# contestant_id (contestant_id => contestants.id)
|
# contestant_id (contestant_id => contestants.id)
|
||||||
# puzzle_id (puzzle_id => puzzles.id)
|
# puzzle_id (puzzle_id => puzzles.id)
|
||||||
#
|
#
|
||||||
one:
|
completion_one:
|
||||||
time_seconds: 1
|
time_seconds: 1
|
||||||
contestant: one
|
contestant: team_one
|
||||||
puzzle: one
|
puzzle: puzzle_one
|
||||||
|
contest: team_contest
|
||||||
|
|
||||||
two:
|
completion_two:
|
||||||
time_seconds: 1
|
time_seconds: 2
|
||||||
contestant: two
|
contestant: solo_one
|
||||||
puzzle: two
|
puzzle: puzzle_two
|
||||||
|
contest: solo_contest
|
||||||
|
18
test/fixtures/contestants.yml
vendored
18
test/fixtures/contestants.yml
vendored
@ -19,12 +19,14 @@
|
|||||||
#
|
#
|
||||||
# contest_id (contest_id => contests.id)
|
# contest_id (contest_id => contests.id)
|
||||||
#
|
#
|
||||||
one:
|
team_one:
|
||||||
name: MyString
|
name: Team one
|
||||||
email: MyString
|
contest: team_contest
|
||||||
contest: one
|
|
||||||
|
|
||||||
two:
|
team_two:
|
||||||
name: MyString
|
name: Team two
|
||||||
email: MyString
|
contest: team_contest
|
||||||
contest: two
|
|
||||||
|
solo_one:
|
||||||
|
name: Solo one
|
||||||
|
contest: solo_contest
|
||||||
|
17
test/fixtures/contests.yml
vendored
17
test/fixtures/contests.yml
vendored
@ -21,10 +21,15 @@
|
|||||||
#
|
#
|
||||||
# user_id (user_id => users.id)
|
# user_id (user_id => users.id)
|
||||||
#
|
#
|
||||||
one:
|
|
||||||
name: MyString
|
|
||||||
user: one
|
|
||||||
|
|
||||||
two:
|
team_contest:
|
||||||
name: MyString
|
name: Team contest
|
||||||
user: two
|
user: user
|
||||||
|
slug: team-contest
|
||||||
|
team: true
|
||||||
|
|
||||||
|
solo_contest:
|
||||||
|
name: Solo contest
|
||||||
|
user: user
|
||||||
|
slug: solo-contest
|
||||||
|
team: false
|
||||||
|
12
test/fixtures/puzzles.yml
vendored
12
test/fixtures/puzzles.yml
vendored
@ -19,8 +19,12 @@
|
|||||||
#
|
#
|
||||||
# contest_id (contest_id => contests.id)
|
# contest_id (contest_id => contests.id)
|
||||||
#
|
#
|
||||||
one:
|
puzzle_one:
|
||||||
name: MyString
|
name: Puzzle one
|
||||||
|
brand: Brand one
|
||||||
|
contest: team_contest
|
||||||
|
|
||||||
two:
|
puzzle_two:
|
||||||
name: MyString
|
name: Puzzle two
|
||||||
|
brand: Brand two
|
||||||
|
contest: solo_contest
|
||||||
|
19
test/fixtures/users.yml
vendored
19
test/fixtures/users.yml
vendored
@ -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
|
# == Schema Information
|
||||||
#
|
#
|
||||||
@ -16,10 +17,14 @@
|
|||||||
#
|
#
|
||||||
# index_users_on_email_address (email_address) UNIQUE
|
# index_users_on_email_address (email_address) UNIQUE
|
||||||
#
|
#
|
||||||
one:
|
admin_user:
|
||||||
email_address: one@example.com
|
email_address: admin@admin.org
|
||||||
password_digest: <%= password_digest %>
|
password_digest: <%= admin_password_digest %>
|
||||||
|
username: admin
|
||||||
|
admin: true
|
||||||
|
|
||||||
two:
|
user:
|
||||||
email_address: two@example.com
|
email_address: user@user.org
|
||||||
password_digest: <%= password_digest %>
|
password_digest: <%= user_password_digest %>
|
||||||
|
username: user
|
||||||
|
admin: false
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
require "test_helper"
|
require "test_helper"
|
||||||
|
|
||||||
class UserTest < ActiveSupport::TestCase
|
class UserTest < ActiveSupport::TestCase
|
||||||
# test "the truth" do
|
test "the truth" do
|
||||||
# assert true
|
assert true
|
||||||
# end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user