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:
evazion
2020-02-16 23:02:23 -06:00
parent 207861fd40
commit 2dab9aa075
16 changed files with 23 additions and 46 deletions

View File

@@ -1,6 +1,5 @@
FactoryBot.define do
factory(:artist) do
creator
name { rand(1_000_000).to_s }
is_active { true }
end

View File

@@ -1,6 +1,5 @@
FactoryBot.define do
factory(:note) do
creator
post
x { 1 }
y { 1 }

View File

@@ -1,6 +1,5 @@
FactoryBot.define do
factory(:pool) do
creator
name {"pool_" + rand(100..1000099).to_s}
description {FFaker::Lorem.sentences.join(" ")}
end

View File

@@ -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)