diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/dummy/db/schema.rb | 33 | ||||
-rw-r--r-- | test/fixtures/wittle/puzzles.yml | 11 | ||||
-rw-r--r-- | test/fixtures/wittle/scores.yml | 13 | ||||
-rw-r--r-- | test/models/wittle/puzzle_test.rb | 9 | ||||
-rw-r--r-- | test/models/wittle/score_test.rb | 9 |
5 files changed, 75 insertions, 0 deletions
diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb new file mode 100644 index 0000000..928cc3c --- /dev/null +++ b/test/dummy/db/schema.rb | |||
@@ -0,0 +1,33 @@ | |||
1 | # This file is auto-generated from the current state of the database. Instead | ||
2 | # of editing this file, please use the migrations feature of Active Record to | ||
3 | # incrementally modify your database, and then regenerate this schema definition. | ||
4 | # | ||
5 | # This file is the source Rails uses to define your schema when running `bin/rails | ||
6 | # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to | ||
7 | # be faster and is potentially less error prone than running all of your | ||
8 | # migrations from scratch. Old migrations may fail to apply correctly if those | ||
9 | # migrations use external dependencies or application code. | ||
10 | # | ||
11 | # It's strongly recommended that you check this file into your version control system. | ||
12 | |||
13 | ActiveRecord::Schema[7.1].define(version: 2023_10_28_210722) do | ||
14 | create_table "wittle_puzzles", force: :cascade do |t| | ||
15 | t.text "data" | ||
16 | t.text "solved_data" | ||
17 | t.string "category" | ||
18 | t.datetime "created_at", null: false | ||
19 | t.datetime "updated_at", null: false | ||
20 | end | ||
21 | |||
22 | create_table "wittle_scores", force: :cascade do |t| | ||
23 | t.integer "puzzle_id", null: false | ||
24 | t.string "name" | ||
25 | t.string "ip" | ||
26 | t.integer "seconds_taken" | ||
27 | t.datetime "created_at", null: false | ||
28 | t.datetime "updated_at", null: false | ||
29 | t.index ["puzzle_id"], name: "index_wittle_scores_on_puzzle_id" | ||
30 | end | ||
31 | |||
32 | add_foreign_key "wittle_scores", "puzzles" | ||
33 | end | ||
diff --git a/test/fixtures/wittle/puzzles.yml b/test/fixtures/wittle/puzzles.yml new file mode 100644 index 0000000..75f9eab --- /dev/null +++ b/test/fixtures/wittle/puzzles.yml | |||
@@ -0,0 +1,11 @@ | |||
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html | ||
2 | |||
3 | one: | ||
4 | data: MyText | ||
5 | solved_data: MyText | ||
6 | category: MyString | ||
7 | |||
8 | two: | ||
9 | data: MyText | ||
10 | solved_data: MyText | ||
11 | category: MyString | ||
diff --git a/test/fixtures/wittle/scores.yml b/test/fixtures/wittle/scores.yml new file mode 100644 index 0000000..1f21c4c --- /dev/null +++ b/test/fixtures/wittle/scores.yml | |||
@@ -0,0 +1,13 @@ | |||
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html | ||
2 | |||
3 | one: | ||
4 | puzzle: one | ||
5 | name: MyString | ||
6 | ip: MyString | ||
7 | seconds_taken: 1 | ||
8 | |||
9 | two: | ||
10 | puzzle: two | ||
11 | name: MyString | ||
12 | ip: MyString | ||
13 | seconds_taken: 1 | ||
diff --git a/test/models/wittle/puzzle_test.rb b/test/models/wittle/puzzle_test.rb new file mode 100644 index 0000000..f826aa3 --- /dev/null +++ b/test/models/wittle/puzzle_test.rb | |||
@@ -0,0 +1,9 @@ | |||
1 | require "test_helper" | ||
2 | |||
3 | module Wittle | ||
4 | class PuzzleTest < ActiveSupport::TestCase | ||
5 | # test "the truth" do | ||
6 | # assert true | ||
7 | # end | ||
8 | end | ||
9 | end | ||
diff --git a/test/models/wittle/score_test.rb b/test/models/wittle/score_test.rb new file mode 100644 index 0000000..0d5e4a3 --- /dev/null +++ b/test/models/wittle/score_test.rb | |||
@@ -0,0 +1,9 @@ | |||
1 | require "test_helper" | ||
2 | |||
3 | module Wittle | ||
4 | class ScoreTest < ActiveSupport::TestCase | ||
5 | # test "the truth" do | ||
6 | # assert true | ||
7 | # end | ||
8 | end | ||
9 | end | ||