Uses the TagSanitizer in Debate

This commit is contained in:
kikito
2015-08-03 19:32:00 +02:00
parent 99c09afb02
commit b53bc42dcd
3 changed files with 32 additions and 0 deletions

View File

@@ -31,6 +31,12 @@ describe Debate do
expect(@debate.description).to eq("alert('danger');")
end
it "should sanitize the tag list" do
@debate.tag_list = "user_id=1"
@debate.valid?
expect(@debate.tag_list).to eq(['user_id1'])
end
it "should not be valid without accepting terms of service" do
@debate.terms_of_service = nil
expect(@debate).to_not be_valid