First
CI / scan_ruby (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
2026-04-29 00:06:36 +01:00
commit 6f64e1a530
97 changed files with 3179 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
require "test_helper"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ]
end
@@ -0,0 +1,13 @@
require "test_helper"
module ApplicationCable
class ConnectionTest < ActionCable::Connection::TestCase
# test "connects with cookies" do
# cookies.signed[:user_id] = 42
#
# connect
#
# assert_equal connection.user_id, "42"
# end
end
end
View File
View File
View File
View File
+31
View File
@@ -0,0 +1,31 @@
require "test_helper"
class MotorlotFlowTest < ActionDispatch::IntegrationTest
test "advert page renders puzzle listing" do
get root_path
assert_response :success
assert_includes response.body, "2021 Porsche 718 Cayman S"
assert_includes response.body, "JHDU"
assert_includes response.body, "VFVSQk8="
assert_includes response.body, "PDI-24-16"
end
test "admin unlock succeeds with the full password" do
post admin_path, params: { password: "GEAR-AXLE-TURBO-PARK" }
assert_redirected_to admin_path
follow_redirect!
assert_response :success
assert_includes response.body, "Admin Panel Unlocked"
assert_includes response.body, "Delete adverts"
end
test "admin unlock rejects invalid passwords" do
post admin_path, params: { password: "wrong-answer" }
assert_response :unprocessable_entity
assert_includes response.body, "did not unlock anything"
end
end
View File
View File
View File
+15
View File
@@ -0,0 +1,15 @@
ENV["RAILS_ENV"] ||= "test"
require_relative "../config/environment"
require "rails/test_help"
module ActiveSupport
class TestCase
# Run tests in parallel with specified workers
parallelize(workers: :number_of_processors)
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
# Add more helper methods to be used by all tests here...
end
end