Sha256: 0cd9a04499eedf35915bd43ca5fdc4599fe5b3bc35392310216417f76dd3d296
Contents?: true
Size: 523 Bytes
Versions: 5
Compression:
Stored size: 523 Bytes
Contents
# frozen_string_literal: true require "spec_helper" RSpec.describe "Removing unused" do let(:article) { Article.create } it "deletes only unused tags" do pancakes = Gutentag::Tag.create :name => "pancakes" Gutentag::Tag.create :name => "waffles" Gutentag::Tagging.create :tag => pancakes, :taggable => article expect(Gutentag::Tag.pluck(:name)).to match_array(%w[ pancakes waffles ]) Gutentag::RemoveUnused.call expect(Gutentag::Tag.pluck(:name)).to match_array(%w[ pancakes ]) end end
Version data entries
5 entries across 5 versions & 1 rubygems