Sha256: 24ba53cd924931557272a343edd0541f048c32ae78585d08f90005ab03e568f2
Contents?: true
Size: 517 Bytes
Versions: 11
Compression:
Stored size: 517 Bytes
Contents
# frozen_string_literal: true require "spec_helper" 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
11 entries across 11 versions & 1 rubygems