diff --git a/test/functional/mpog_software_plugin_myprofile_controller_test.rb b/test/functional/mpog_software_plugin_myprofile_controller_test.rb index 62946ad..e416686 100644 --- a/test/functional/mpog_software_plugin_myprofile_controller_test.rb +++ b/test/functional/mpog_software_plugin_myprofile_controller_test.rb @@ -79,4 +79,20 @@ class MpogSoftwarePluginMyprofileControllerTest < ActionController::TestCase assert_equal "Ana de Souza",response[1]["name"] assert_equal "Angela Silva",response[2]["name"] end + + should 'make search for Ang for offerer in software creation' do + offer_token = "Ang" + post :search_offerers, :profile => person.identifier,:q => offer_token + response = JSON.parse(@response.body) + assert_equal "Angelo Roberto",response[0]["name"] + assert_equal "Angela Silva",response[1]["name"] + end + + should 'not find any offerer for software creation' do + offer_token = "Jos" + post :search_offerers, :profile => person.identifier,:q => offer_token + response = JSON.parse(@response.body) + assert response.count == 0 + end + end diff --git a/views/mpog_software_plugin_myprofile/new_software.html.erb b/views/mpog_software_plugin_myprofile/new_software.html.erb index 774a1b8..15f1613 100644 --- a/views/mpog_software_plugin_myprofile/new_software.html.erb +++ b/views/mpog_software_plugin_myprofile/new_software.html.erb @@ -97,13 +97,13 @@ <%= swf.text_field(:demonstration_url) %> <% end %> - +