Commit e50b5e5aa4d1773fd0e5b78be9940e2a0b6cf25c
1 parent
06e544ca
Exists in
master
and in
5 other branches
Fix functional tests
Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com> Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
Showing
2 changed files
with
9 additions
and
7 deletions
Show diff stats
test/functional/account_controller_test.rb
... | ... | @@ -40,11 +40,11 @@ class AccountControllerTest < ActionController::TestCase |
40 | 40 | } |
41 | 41 | |
42 | 42 | @profile_data_info = { |
43 | - :name=>"Um novo usuario", | |
43 | + :name=>"Um Novo Usuario", | |
44 | 44 | } |
45 | 45 | |
46 | 46 | @second_profile_data_info = { |
47 | - :name=>"Um outro usuario", | |
47 | + :name=>"Um Outro Usuario", | |
48 | 48 | } |
49 | 49 | disable_signup_bot_check |
50 | 50 | end | ... | ... |
test/functional/mpog_software_plugin_myprofile_controller_test.rb
... | ... | @@ -41,17 +41,19 @@ class MpogSoftwarePluginMyprofileControllerTest < ActionController::TestCase |
41 | 41 | offer_token = "An" |
42 | 42 | post :search_offerers, :profile => person.identifier,:q => offer_token |
43 | 43 | response = JSON.parse(@response.body) |
44 | - assert_equal "Angelo Roberto",response[0]["name"] | |
45 | - assert_equal "Ana de Souza",response[1]["name"] | |
46 | - assert_equal "Angela Silva",response[2]["name"] | |
44 | + response.sort!{|a, b| a["name"] <=> b["name"]} | |
45 | + assert_equal "Ana de Souza",response[0]["name"] | |
46 | + assert_equal "Angela Silva",response[1]["name"] | |
47 | + assert_equal "Angelo Roberto",response[2]["name"] | |
47 | 48 | end |
48 | 49 | |
49 | 50 | should 'make search for Ang for offerer in software creation' do |
50 | 51 | offer_token = "Ang" |
51 | 52 | post :search_offerers, :profile => person.identifier,:q => offer_token |
52 | 53 | response = JSON.parse(@response.body) |
53 | - assert_equal "Angelo Roberto",response[0]["name"] | |
54 | - assert_equal "Angela Silva",response[1]["name"] | |
54 | + response.sort!{|a, b| a["name"] <=> b["name"]} | |
55 | + assert_equal "Angela Silva",response[0]["name"] | |
56 | + assert_equal "Angelo Roberto",response[1]["name"] | |
55 | 57 | end |
56 | 58 | |
57 | 59 | should 'not find any offerer for software creation' do | ... | ... |