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 %> - +
<%= content_tag('label', _('Fill in the search field to add offerers for this Software'), :id => "text-input-search-offerers") %> <%= token_input_field_tag(:q, 'search-offerers', {:action => 'search_offerers'}, { :focus => true, :hint_text => _('Type in a search term for a person to be added as offerers'), :pre_populate => @tokenized_children}) %>
- +

<%= _("Libraries") %>

<%= render :partial => 'library_fields', :locals => { :f => f, :object_name => 'community', :profile => @community, :libraries => @list_libraries } %> -- libgit2 0.21.2