From 7cbd8da9941e75c50f2cddce52911fc235a1d8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Miedes=20Garc=C3=A9s?= Date: Thu, 26 Jan 2017 12:26:42 +0100 Subject: [PATCH] Move outdated Tag specs to ActsAsTaggableOn::Tag specs file --- spec/lib/acts_as_taggable_on_spec.rb | 20 ++++++++++++++++++++ spec/models/tag_spec.rb | 24 ------------------------ 2 files changed, 20 insertions(+), 24 deletions(-) delete mode 100644 spec/models/tag_spec.rb diff --git a/spec/lib/acts_as_taggable_on_spec.rb b/spec/lib/acts_as_taggable_on_spec.rb index dbf76d52b..59a469f88 100644 --- a/spec/lib/acts_as_taggable_on_spec.rb +++ b/spec/lib/acts_as_taggable_on_spec.rb @@ -64,6 +64,26 @@ describe 'ActsAsTaggableOn' do expect(tag.proposals_count).to eq(1) end end + + describe "public_for_api scope" do + it "returns tags whose kind is NULL" do + tag = create(:tag, kind: nil) + + expect(ActsAsTaggableOn::Tag.public_for_api).to include(tag) + end + + it "returns tags whose kind is 'category'" do + tag = create(:tag, kind: 'category') + + expect(ActsAsTaggableOn::Tag.public_for_api).to include(tag) + end + + it "blocks other kinds of tags" do + tag = create(:tag, kind: 'foo') + + expect(ActsAsTaggableOn::Tag.public_for_api).not_to include(tag) + end + end end end diff --git a/spec/models/tag_spec.rb b/spec/models/tag_spec.rb deleted file mode 100644 index fa26b7622..000000000 --- a/spec/models/tag_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'rails_helper' - -describe 'Tag' do - - describe "public_for_api scope" do - it "returns tags whose kind is NULL" do - tag = create(:tag, kind: nil) - - expect(Tag.public_for_api).to include(tag) - end - - it "returns tags whose kind is 'category'" do - tag = create(:tag, kind: 'category') - - expect(Tag.public_for_api).to include(tag) - end - - it "blocks other kinds of tags" do - tag = create(:tag, kind: 'foo') - - expect(Tag.public_for_api).not_to include(tag) - end - end -end