tests: fix unit tests.

* Move old post archive tests to post version tests.

* Fix pool tests that assumed that multiple edits by the same user
  weren't merged.

* Fix references to `is_active` and `notes` on artist model.
This commit is contained in:
evazion
2020-03-21 16:47:50 -05:00
parent 94ae10b1a6
commit 3656063a6b
16 changed files with 134 additions and 279 deletions

View File

@@ -191,12 +191,12 @@ class ArtistUrlTest < ActiveSupport::TestCase
subject { ArtistUrl }
should "work" do
@bkub = create(:artist, name: "bkub", url_string: "https://bkub.com")
@masao = create(:artist, name: "masao", url_string: "-https://masao.com")
@bkub = create(:artist, name: "bkub", is_deleted: false, url_string: "https://bkub.com")
@masao = create(:artist, name: "masao", is_deleted: true, url_string: "-https://masao.com")
@bkub_url = @bkub.urls.first
@masao_url = @masao.urls.first
assert_search_equals([@bkub_url], is_deleted: false)
assert_search_equals([@bkub_url], is_active: true)
assert_search_equals([@bkub_url], artist: { name: "bkub" })
assert_search_equals([@bkub_url], url_matches: "*bkub*")