このコミットが含まれているのは:
@@ -525,8 +525,9 @@ RSpec.describe 'Posts API', type: :request do
|
||||
|
||||
context "when nico tag already exists in tags" do
|
||||
before do
|
||||
Tag.find_or_create_by!(tag_name: TagName.find_or_create_by!(name: 'nico:nico_tag'),
|
||||
category: :nico)
|
||||
Tag.find_undiscard_or_create_by!(
|
||||
tag_name: TagName.find_undiscard_or_create_by!(name: 'nico:nico_tag'),
|
||||
category: :nico)
|
||||
end
|
||||
|
||||
it 'return 400' do
|
||||
@@ -610,8 +611,9 @@ RSpec.describe 'Posts API', type: :request do
|
||||
|
||||
context "when nico tag already exists in tags" do
|
||||
before do
|
||||
Tag.find_or_create_by!(tag_name: TagName.find_or_create_by!(name: 'nico:nico_tag'),
|
||||
category: :nico)
|
||||
Tag.find_undiscard_or_create_by!(
|
||||
tag_name: TagName.find_undiscard_or_create_by!(name: 'nico:nico_tag'),
|
||||
category: :nico)
|
||||
end
|
||||
|
||||
it 'return 400' do
|
||||
|
||||
@@ -8,8 +8,8 @@ RSpec.describe "nico:sync" do
|
||||
end
|
||||
|
||||
def create_tag!(name, category:)
|
||||
tn = TagName.find_or_create_by!(name: name.to_s.strip)
|
||||
Tag.find_or_create_by!(tag_name_id: tn.id) { |t| t.category = category }
|
||||
tn = TagName.find_undiscard_or_create_by!(name: name.to_s.strip)
|
||||
Tag.find_undiscard_or_create_by!(tag_name_id: tn.id) { |t| t.category = category }
|
||||
end
|
||||
|
||||
def link_nico_to_tag!(nico_tag, tag)
|
||||
|
||||
新しい課題から参照
ユーザをブロックする