diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb index e25f2e7..678a7ee 100644 --- a/test/functional/cms_controller_test.rb +++ b/test/functional/cms_controller_test.rb @@ -584,7 +584,8 @@ class CmsControllerTest < Test::Unit::TestCase should 'be able to add image with alignment' do post :new, :type => 'TinyMceArticle', :profile => profile.identifier, :article => { :name => 'image-alignment', :body => "the text of the article with image right align..." } saved = TinyMceArticle.find_by_name('image-alignment') - assert_match //, saved.body + assert_match //, saved.body + assert_match //, saved.body end should 'not be able to add image with alignment when textile' do diff --git a/test/functional/invite_controller_test.rb b/test/functional/invite_controller_test.rb index b7a8d99..05df1ea 100644 --- a/test/functional/invite_controller_test.rb +++ b/test/functional/invite_controller_test.rb @@ -188,9 +188,10 @@ class InviteControllerTest < ActionController::TestCase should 'return hash as invitation data if contact list was fetched' do contact_list = ContactList.create(:fetched => true) get :invitation_data, :profile => profile.identifier, :contact_list => contact_list.id + hash = {'fetched' => true, 'contact_list' => contact_list.id, 'error' => nil} assert_equal 'application/javascript', @response.content_type - assert_equal "{\"fetched\": true, \"contact_list\": #{contact_list.id}, \"error\": null}", @response.body + assert_equal hash, json_response end should 'render empty list of contacts' do @@ -233,4 +234,11 @@ class InviteControllerTest < ActionController::TestCase assert_equal 'pt', Delayed::Job.first.payload_object.locale end + private + + def json_response + ActiveSupport::JSON.decode @response.body + end + + end -- libgit2 0.21.2