Adds a test spec for plaintext tags

This commit is contained in:
Alex Chvatal 2011-06-22 23:11:59 -04:00
parent 7a56322b60
commit a9d4ac45ac

View file

@ -49,6 +49,15 @@ describe ProfilesController do
put :update, params
@user.person(true).profile.tag_list.to_set.should == ['apples', 'oranges'].to_set
end
it 'sets plaintext tags' do
params = { :id => @user.person.id,
:tags => ',#apples,#oranges,',
:profile => {:tag_string => '#pears'} }
put :update, params
@user.person(true).profile.tag_list.to_set.should == ['apples', 'oranges', 'pears'].to_set
end
context 'with a profile photo set' do
before do