FEATURE: new tags can be created from the "edit category" modal when defining the set of permitted tags

This commit is contained in:
Neil Lalonde
2016-05-31 17:26:00 -04:00
parent 2c78bea5a0
commit deb93044b4
3 changed files with 26 additions and 7 deletions

View File

@ -51,5 +51,10 @@ describe "category tag restrictions" do
post = create_post(category: other_category, tags: [tag3.name, "newtag"])
expect(post.topic.tags.map(&:name).sort).to eq([tag3.name, "newtag"].sort)
end
it "can create tags when changing category settings" do
expect { other_category.update(allowed_tags: ['newtag']) }.to change { Tag.count }.by(1)
expect { other_category.update(allowed_tags: [tag1.name, 'tag-stuff', tag2.name, 'another-tag']) }.to change { Tag.count }.by(2)
end
end
end