Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Commit 12f6046

Browse files
committed
Add skeleton for tests
1 parent 56c8ae9 commit 12f6046

8 files changed

+107
-7
lines changed

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Rake::TestTask.new(:test) do |t|
1111
t.libs << 'test'
1212
t.pattern = 'test/**/*_test.rb'
1313
t.verbose = false
14+
t.warning = false
1415
end
1516

1617
task default: :test
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
require "test_helper"
2+
3+
module ActionTextSyntaxHighlighter
4+
class HighlightedCodeBlocksControllerTest < ActionDispatch::IntegrationTest
5+
test "the truth" do
6+
assert true
7+
end
8+
end
9+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class CreateActionTextHighlightedCodeBlocks < ActiveRecord::Migration[6.1]
2+
def change
3+
create_table :action_text_highlighted_code_blocks do |t|
4+
t.text :content, size: :medium
5+
t.string :language
6+
t.references :rich_text, foreign_key: { to_table: :action_text_rich_texts, on_delete: :cascade }
7+
8+
t.timestamps
9+
end
10+
end
11+
end

test/dummy/db/schema.rb

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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.define(version: 2021_05_31_221748) do
14+
15+
create_table "action_text_highlighted_code_blocks", force: :cascade do |t|
16+
t.text "content"
17+
t.string "language"
18+
t.integer "rich_text_id"
19+
t.datetime "created_at", precision: 6, null: false
20+
t.datetime "updated_at", precision: 6, null: false
21+
t.index ["rich_text_id"], name: "index_action_text_highlighted_code_blocks_on_rich_text_id"
22+
end
23+
24+
create_table "action_text_rich_texts", force: :cascade do |t|
25+
t.string "name", null: false
26+
t.text "body"
27+
t.string "record_type", null: false
28+
t.bigint "record_id", null: false
29+
t.datetime "created_at", precision: 6, null: false
30+
t.datetime "updated_at", precision: 6, null: false
31+
t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true
32+
end
33+
34+
create_table "active_storage_attachments", force: :cascade do |t|
35+
t.string "name", null: false
36+
t.string "record_type", null: false
37+
t.integer "record_id", null: false
38+
t.integer "blob_id", null: false
39+
t.datetime "created_at", null: false
40+
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
41+
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
42+
end
43+
44+
create_table "active_storage_blobs", force: :cascade do |t|
45+
t.string "key", null: false
46+
t.string "filename", null: false
47+
t.string "content_type"
48+
t.text "metadata"
49+
t.string "service_name", null: false
50+
t.bigint "byte_size", null: false
51+
t.string "checksum", null: false
52+
t.datetime "created_at", null: false
53+
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
54+
end
55+
56+
create_table "active_storage_variant_records", force: :cascade do |t|
57+
t.integer "blob_id", null: false
58+
t.string "variation_digest", null: false
59+
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
60+
end
61+
62+
add_foreign_key "action_text_highlighted_code_blocks", "action_text_rich_texts", column: "rich_text_id", on_delete: :cascade
63+
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
64+
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
65+
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module ActionTextSyntaxHighlighter
2+
class PreTagsToHighlightedCodeBlocksConversionTest < ActiveSupport::TestCase
3+
test "the truth" do
4+
assert true
5+
end
6+
end
7+
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module ActionTextSyntaxHighlighter
2+
class RichTextHasHighlightedCodeBlockTest < ActiveSupport::TestCase
3+
test "the truth" do
4+
assert true
5+
end
6+
end
7+
end

test/integration/navigation_test.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module ActionTextSyntaxHighlighter
2+
class HighlightedCodeBlockTest < ActiveSupport::TestCase
3+
test "the truth" do
4+
assert true
5+
end
6+
end
7+
end

0 commit comments

Comments
 (0)