Add posts, tags, tagging, to database. Create references to align with new DB model. Add image of mermaid template model.
This commit is contained in:
parent
4edae5e7bb
commit
8ee5dd9322
17 changed files with 154 additions and 2 deletions
BIN
test/fixtures/files/mermaid_template.png
vendored
Normal file
BIN
test/fixtures/files/mermaid_template.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 184 KiB |
17
test/fixtures/posts.yml
vendored
Normal file
17
test/fixtures/posts.yml
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
title: MyString
|
||||
content: MyText
|
||||
pinned: false
|
||||
user: one
|
||||
image: one
|
||||
type:
|
||||
|
||||
two:
|
||||
title: MyString
|
||||
content: MyText
|
||||
pinned: false
|
||||
user: two
|
||||
image: two
|
||||
type:
|
||||
11
test/fixtures/taggings.yml
vendored
Normal file
11
test/fixtures/taggings.yml
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
tag: one
|
||||
taggable: one
|
||||
taggable_type: Taggable
|
||||
|
||||
two:
|
||||
tag: two
|
||||
taggable: two
|
||||
taggable_type: Taggable
|
||||
9
test/fixtures/tags.yml
vendored
Normal file
9
test/fixtures/tags.yml
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
title: MyString
|
||||
color: MyString
|
||||
|
||||
two:
|
||||
title: MyString
|
||||
color: MyString
|
||||
8
test/fixtures/users.yml
vendored
8
test/fixtures/users.yml
vendored
|
|
@ -4,4 +4,10 @@ one:
|
|||
name: testuser
|
||||
status: test
|
||||
email: test@email.com
|
||||
password_digest: <%= BCrypt::Password.create('testpassword') %>
|
||||
password_digest: <%= BCrypt::Password.create('testpassword') %>
|
||||
|
||||
two:
|
||||
name: testuser2
|
||||
status: dead
|
||||
email: tester2@email.com
|
||||
password_digest: <%= BCrypt::Password.create('tpass2') %>
|
||||
7
test/models/post_test.rb
Normal file
7
test/models/post_test.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
require "test_helper"
|
||||
|
||||
class PostTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
7
test/models/tag_test.rb
Normal file
7
test/models/tag_test.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
require "test_helper"
|
||||
|
||||
class TagTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
7
test/models/tagging_test.rb
Normal file
7
test/models/tagging_test.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
require "test_helper"
|
||||
|
||||
class TaggingTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue