Commit b478a42439211aeba57ef697570578667ae44eee
1 parent
8f20ecab
Exists in
master
and in
79 other branches
find_offerer: Test corrections
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing
1 changed file
with
9 additions
and
4 deletions
Show diff stats
test/functional/mpog_software_plugin_myprofile_controller_test.rb
... | ... | @@ -15,8 +15,9 @@ class MpogSoftwarePluginMyprofileControllerTest < 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 < 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 < 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 | ... | ... |