From 9a7bbdf2b04e1240426605fbdbc3ce40ba008330 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 21 Aug 2013 19:50:04 -0300 Subject: [PATCH] [plugins-tests] Fixing display_content tests --- plugins/display_content/test/functional/display_content_plugin_admin_controller_test.rb | 16 ++++++++-------- plugins/display_content/test/functional/display_content_plugin_myprofile_controller_test.rb | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/plugins/display_content/test/functional/display_content_plugin_admin_controller_test.rb b/plugins/display_content/test/functional/display_content_plugin_admin_controller_test.rb index 363ab45..db5434b 100644 --- a/plugins/display_content/test/functional/display_content_plugin_admin_controller_test.rb +++ b/plugins/display_content/test/functional/display_content_plugin_admin_controller_test.rb @@ -41,7 +41,7 @@ class DisplayContentPluginAdminControllerTest < ActionController::TestCase Article.delete_all get :index, :block_id => block.id json_response = ActiveSupport::JSON.decode(@response.body) - assert_equal [], json_response + assert_equivalent [], json_response end should 'index action returns an json with node content' do @@ -53,7 +53,7 @@ class DisplayContentPluginAdminControllerTest < ActionController::TestCase expected_json = {'data' => article.title} expected_json['attr'] = { 'node_id' => article.id, 'parent_id' => article.parent_id} - assert_equal [expected_json], json_response + assert_equivalent [expected_json], json_response end should 'index action returns an json with node checked if the node is in the nodes list' do @@ -68,7 +68,7 @@ class DisplayContentPluginAdminControllerTest < ActionController::TestCase expected_json['attr'] = { 'node_id' => article.id, 'parent_id' => article.parent_id} expected_json['attr'].merge!({'class' => 'jstree-checked'}) - assert_equal [expected_json], json_response + assert_equivalent [expected_json], json_response end should 'index action returns an json with node undetermined if the node is in the parent nodes list' do @@ -84,7 +84,7 @@ class DisplayContentPluginAdminControllerTest < ActionController::TestCase expected_json['attr'].merge!({'class' => 'jstree-undetermined'}) expected_json['children'] = [] - assert_equal [expected_json], json_response + assert_equivalent [expected_json], json_response end should 'index action returns an json with node closed if the node has article with children' do @@ -98,7 +98,7 @@ class DisplayContentPluginAdminControllerTest < ActionController::TestCase expected_json['attr'] = { 'node_id' => f.id, 'parent_id' => f.parent_id} expected_json['state'] = 'closed' - assert_equal [expected_json], json_response + assert_equivalent [expected_json], json_response end should 'index action returns an json with all the children nodes if some parent is in the parents list' do @@ -121,7 +121,7 @@ class DisplayContentPluginAdminControllerTest < ActionController::TestCase expected_json['children'] = children expected_json['state'] = 'closed' - assert_equal [expected_json], json_response + assert_equivalent [expected_json], json_response end should 'index action returns an json with all the children nodes and root nodes if some parent is in the parents list and there is others root articles' do @@ -151,7 +151,7 @@ class DisplayContentPluginAdminControllerTest < ActionController::TestCase value['attr'] = { 'node_id' => a3.id, 'parent_id' => a3.parent_id} expected_json.push(value) - assert_equal expected_json, json_response + assert_equivalent expected_json, json_response end should 'index action returns an json without children nodes if the parent is not in the parents list' do @@ -173,7 +173,7 @@ class DisplayContentPluginAdminControllerTest < ActionController::TestCase value['attr'] = { 'node_id' => a3.id, 'parent_id' => a3.parent_id} expected_json.push(value) - assert_equal expected_json, json_response + assert_equivalent expected_json, json_response end end diff --git a/plugins/display_content/test/functional/display_content_plugin_myprofile_controller_test.rb b/plugins/display_content/test/functional/display_content_plugin_myprofile_controller_test.rb index 1ad04f7..8eca057 100644 --- a/plugins/display_content/test/functional/display_content_plugin_myprofile_controller_test.rb +++ b/plugins/display_content/test/functional/display_content_plugin_myprofile_controller_test.rb @@ -41,7 +41,7 @@ class DisplayContentPluginMyprofileControllerTest < ActionController::TestCase Article.delete_all get :index, :block_id => block.id, :profile => profile.identifier json_response = ActiveSupport::JSON.decode(@response.body) - assert_equal [], json_response + assert_equivalent [], json_response end should 'index action returns an json with node content' do @@ -53,7 +53,7 @@ class DisplayContentPluginMyprofileControllerTest < ActionController::TestCase expected_json = {'data' => article.title} expected_json['attr'] = { 'node_id' => article.id, 'parent_id' => article.parent_id} - assert_equal [expected_json], json_response + assert_equivalent [expected_json], json_response end should 'index action returns an json with node checked if the node is in the nodes list' do @@ -68,7 +68,7 @@ class DisplayContentPluginMyprofileControllerTest < ActionController::TestCase expected_json['attr'] = { 'node_id' => article.id, 'parent_id' => article.parent_id} expected_json['attr'].merge!({'class' => 'jstree-checked'}) - assert_equal [expected_json], json_response + assert_equivalent [expected_json], json_response end should 'index action returns an json with node undetermined if the node is in the parent nodes list' do @@ -84,7 +84,7 @@ class DisplayContentPluginMyprofileControllerTest < ActionController::TestCase expected_json['attr'].merge!({'class' => 'jstree-undetermined'}) expected_json['children'] = [] - assert_equal [expected_json], json_response + assert_equivalent [expected_json], json_response end should 'index action returns an json with node closed if the node has article with children' do @@ -99,7 +99,7 @@ class DisplayContentPluginMyprofileControllerTest < ActionController::TestCase expected_json['attr'] = { 'node_id' => f.id, 'parent_id' => f.parent_id} expected_json['state'] = 'closed' - assert_equal [expected_json], json_response + assert_equivalent [expected_json], json_response end should 'index action returns an json with all the children nodes if some parent is in the parents list' do @@ -122,7 +122,7 @@ class DisplayContentPluginMyprofileControllerTest < ActionController::TestCase expected_json['children'] = children expected_json['state'] = 'closed' - assert_equal [expected_json], json_response + assert_equivalent [expected_json], json_response end should 'index action returns an json with all the children nodes and root nodes if some parent is in the parents list and there is others root articles' do @@ -152,7 +152,7 @@ class DisplayContentPluginMyprofileControllerTest < ActionController::TestCase value['attr'] = { 'node_id' => a3.id, 'parent_id' => a3.parent_id} expected_json.push(value) - assert_equal expected_json, json_response + assert_equivalent expected_json, json_response end should 'index action returns an json without children nodes if the parent is not in the parents list' do @@ -174,7 +174,7 @@ class DisplayContentPluginMyprofileControllerTest < ActionController::TestCase value['attr'] = { 'node_id' => a3.id, 'parent_id' => a3.parent_id} expected_json.push(value) - assert_equal expected_json, json_response + assert_equivalent expected_json, json_response end end -- libgit2 0.21.2