Commit b478a42439211aeba57ef697570578667ae44eee

Authored by Fabio Teixeira
1 parent 8f20ecab
Exists in master and in 79 other branches add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev_env_minimal, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, prezento, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

find_offerer: Test corrections

Signed-off-by: Fabio Teixeira <fabio1079@gmail.com>
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
test/functional/mpog_software_plugin_myprofile_controller_test.rb
... ... @@ -15,8 +15,9 @@ class MpogSoftwarePluginMyprofileControllerTest &lt; ActionController::TestCase
15 15 @offer_2 = create_user('Angelo Roberto')
16 16  
17 17 LicenseInfo.create(:version=>"CC-GPL-V2", :link=>"http://creativecommons.org/licenses/GPL/2.0/legalcode.pt")
18   - ProgramLanguage.create(:name =>"language")
  18 + ProgrammingLanguage.create(:name =>"language")
19 19 DatabaseDescription.create(:name => "database")
  20 + OperatingSystemName.create(:name=>"Debian")
20 21  
21 22 login_as(@person.user.login)
22 23 e = Environment.default
... ... @@ -36,7 +37,6 @@ class MpogSoftwarePluginMyprofileControllerTest &lt; ActionController::TestCase
36 37 :intern => false ,
37 38 :e_ping => false ,
38 39 :e_arq => false,
39   - :name =>'test',
40 40 :operating_platform =>'operating_plataform_test',
41 41 :demonstration_url => 'test',
42 42 :acronym => 'test',
... ... @@ -48,20 +48,25 @@ class MpogSoftwarePluginMyprofileControllerTest &lt; ActionController::TestCase
48 48 :version => 'test',
49 49 :license=> 'test'
50 50 },{}]
  51 + operating_system = [{
  52 + :operating_system_name_id => OperatingSystemName.last.id,
  53 + :version => "stable"
  54 + }, {}]
51 55 database = [{
52 56 :database_description_id => DatabaseDescription.last.id,
53 57 :version => 'database version',
54 58 :operating_system => 'database operating_system'
55 59 },{}]
56 60 language = [{
57   - :program_languages_id => ProgramLanguage.last.id,
  61 + :programming_language_id => ProgrammingLanguage.last.id,
58 62 :version => 'language version',
59 63 :operating_system => 'language operating_system'
60 64 },{}]
61 65  
62 66 license_info = {:version => "CC-GPL-V2",:link => "http://creativecommons.org/licenses/GPL/2.0/legalcode.pt"}
63 67 post :new_software, :profile => person.identifier, :community => community, :license_info => license_info,
64   - :software_info => software_info, :library => library, :database => database, :language => language, :q => @offer.id
  68 + :software_info => software_info, :library => library, :database => database,
  69 + :language => language, :operating_system=>operating_system, :q => @offer.id
65 70  
66 71 assert_equal @offer.id, Community.last.admins.last.id
67 72 end
... ...