Compare commits

..

No commits in common. "c98caeea92aca54cdcb4e0b2448243e125f6fa2e" and "14be4a32e655882993970f42fbd29a76834c6589" have entirely different histories.

9 changed files with 73 additions and 54 deletions

View File

@ -58,7 +58,16 @@ jobs:
steps: steps:
- name: Install packages - name: Install packages
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y build-essential git libyaml-dev pkg-config run: sudo apt-get update && sudo apt-get install --no-install-recommends -y build-essential git libyaml-dev pkg-config software-properties-common apt-transport-https ca-certificates
#- name: Import Chrome GPG key
# run: curl -fSsL https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor | sudo tee /usr/share/keyrings/google-chrome.gpg >> /dev/null
#- name: Import Chrome APT repository
# run: echo deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main | sudo tee /etc/apt/sources.list.d/google-chrome.list
#- name: Install Chrome
# run: sudo apt update && sudo apt install google-chrome-stable
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@ -1,4 +1,8 @@
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

View File

@ -1,4 +1,28 @@
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

View File

@ -24,14 +24,12 @@
# contestant_id (contestant_id => contestants.id) # contestant_id (contestant_id => contestants.id)
# puzzle_id (puzzle_id => puzzles.id) # puzzle_id (puzzle_id => puzzles.id)
# #
completion_one: one:
time_seconds: 1 time_seconds: 1
contestant: team_one contestant: one
puzzle: puzzle_one puzzle: one
contest: team_contest
completion_two: two:
time_seconds: 2 time_seconds: 1
contestant: solo_one contestant: two
puzzle: puzzle_two puzzle: two
contest: solo_contest

View File

@ -19,14 +19,12 @@
# #
# contest_id (contest_id => contests.id) # contest_id (contest_id => contests.id)
# #
team_one: one:
name: Team one name: MyString
contest: team_contest email: MyString
contest: one
team_two: two:
name: Team two name: MyString
contest: team_contest email: MyString
contest: two
solo_one:
name: Solo one
contest: solo_contest

View File

@ -21,15 +21,10 @@
# #
# user_id (user_id => users.id) # user_id (user_id => users.id)
# #
one:
name: MyString
user: one
team_contest: two:
name: Team contest name: MyString
user: user user: two
slug: team-contest
team: true
solo_contest:
name: Solo contest
user: user
slug: solo-contest
team: false

View File

@ -19,12 +19,8 @@
# #
# contest_id (contest_id => contests.id) # contest_id (contest_id => contests.id)
# #
puzzle_one: one:
name: Puzzle one name: MyString
brand: Brand one
contest: team_contest
puzzle_two: two:
name: Puzzle two name: MyString
brand: Brand two
contest: solo_contest

View File

@ -1,5 +1,4 @@
<% admin_password_digest = BCrypt::Password.create("admin") %> <% password_digest = BCrypt::Password.create("password") %>
<% user_password_digest = BCrypt::Password.create("user") %>
# == Schema Information # == Schema Information
# #
@ -17,14 +16,10 @@
# #
# index_users_on_email_address (email_address) UNIQUE # index_users_on_email_address (email_address) UNIQUE
# #
admin_user: one:
email_address: admin@admin.org email_address: one@example.com
password_digest: <%= admin_password_digest %> password_digest: <%= password_digest %>
username: admin
admin: true
user: two:
email_address: user@user.org email_address: two@example.com
password_digest: <%= user_password_digest %> password_digest: <%= password_digest %>
username: user
admin: false

View File

@ -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