models: remove creator_id from artists, notes, and pools.
Remove the creator_id field from artists, notes, and pools. The creator_id wasn't otherwise used and was inconsistent with the artist/note/pool history in some cases, especially for old artists.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
FactoryBot.define do
|
||||
factory(:artist) do
|
||||
creator
|
||||
name { rand(1_000_000).to_s }
|
||||
is_active { true }
|
||||
end
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
FactoryBot.define do
|
||||
factory(:note) do
|
||||
creator
|
||||
post
|
||||
x { 1 }
|
||||
y { 1 }
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
FactoryBot.define do
|
||||
factory(:pool) do
|
||||
creator
|
||||
name {"pool_" + rand(100..1000099).to_s}
|
||||
description {FFaker::Lorem.sentences.join(" ")}
|
||||
end
|
||||
|
||||
@@ -524,7 +524,7 @@ class ArtistTest < ActiveSupport::TestCase
|
||||
context "#new_with_defaults" do
|
||||
should "fetch the defaults from the given source" do
|
||||
source = "https://i.pximg.net/img-original/img/2018/01/28/23/56/50/67014762_p0.jpg"
|
||||
artist = Artist.new_with_defaults(source: source, creator: create(:user))
|
||||
artist = Artist.new_with_defaults(source: source)
|
||||
|
||||
assert_equal("niceandcool", artist.name)
|
||||
assert_equal("nice_and_cool", artist.other_names_string)
|
||||
|
||||
Reference in New Issue
Block a user