so turns out whether an id is serialized to a json integer or string

depends on the DB backend
This commit is contained in:
Jonne Haß 2014-08-30 22:15:05 +02:00
parent 5d549f553b
commit 6df79f6983

View file

@ -46,7 +46,7 @@ describe ConversationsController do
contact.person.profile.update_attribute(:first_name, xss) contact.person.profile.update_attribute(:first_name, xss)
get :new get :new
json = JSON.parse(assigns(:contacts_json)).first json = JSON.parse(assigns(:contacts_json)).first
expect(json['value']).to eq(contact.id.to_s) expect(json['value'].to_s).to eq(contact.id.to_s)
expect(json['name']).to_not include(xss) expect(json['name']).to_not include(xss)
end end
end end