about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-28 17:32:45 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-28 17:32:45 -0400
commit141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe (patch)
tree234bc2a3ccd234b576330061db8a17ad785135ed /test
parentcfc41eb3ccc99b92220115b0710fb821525e1075 (diff)
downloadwittle-141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe.tar.gz
wittle-141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe.tar.bz2
wittle-141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe.zip
created puzzle and score tables
Diffstat (limited to 'test')
-rw-r--r--test/dummy/db/schema.rb33
-rw-r--r--test/fixtures/wittle/puzzles.yml11
-rw-r--r--test/fixtures/wittle/scores.yml13
-rw-r--r--test/models/wittle/puzzle_test.rb9
-rw-r--r--test/models/wittle/score_test.rb9
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
13ActiveRecord::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"
33end
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
3one:
4 data: MyText
5 solved_data: MyText
6 category: MyString
7
8two:
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
3one:
4 puzzle: one
5 name: MyString
6 ip: MyString
7 seconds_taken: 1
8
9two:
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 @@
1require "test_helper"
2
3module Wittle
4 class PuzzleTest < ActiveSupport::TestCase
5 # test "the truth" do
6 # assert true
7 # end
8 end
9end
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 @@
1require "test_helper"
2
3module Wittle
4 class ScoreTest < ActiveSupport::TestCase
5 # test "the truth" do
6 # assert true
7 # end
8 end
9end