Commit 6d465d99c1ddbff000a3760bcfb8a069a41271b5
1 parent
e092f472
Exists in
master
and in
5 other branches
Fix mpog_software_plugin_myprofile_controller_test.rb
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>
Showing
1 changed file
with
5 additions
and
4 deletions
Show diff stats
test/functional/mpog_software_plugin_myprofile_controller_test.rb
... | ... | @@ -23,9 +23,9 @@ class MpogSoftwarePluginMyprofileControllerTest < ActionController::TestCase |
23 | 23 | OperatingSystemName.create(:name=>"Debian") |
24 | 24 | |
25 | 25 | login_as(@person.user.login) |
26 | - @e = Environment.default | |
27 | - @e.enable_plugin('MpogSoftwarePlugin') | |
28 | - @e.save! | |
26 | + @environment = Environment.default | |
27 | + @environment.enable_plugin('MpogSoftwarePlugin') | |
28 | + @environment.save! | |
29 | 29 | end |
30 | 30 | |
31 | 31 | attr_accessor :person, :offer |
... | ... | @@ -66,7 +66,8 @@ class MpogSoftwarePluginMyprofileControllerTest < ActionController::TestCase |
66 | 66 | |
67 | 67 | should 'create a new software with all fields filled in' do |
68 | 68 | fields = software_fields |
69 | - post :new_software, :profile => person.identifier, :community => fields[1], :license_info => fields[0], | |
69 | + @environment.add_admin(@person) | |
70 | + post :new_software, :profile => @person.identifier, :community => fields[1], :license_info => fields[0], | |
70 | 71 | :software_info => fields[2] |
71 | 72 | assert_equal SoftwareInfo.last.community.name, "Debian" |
72 | 73 | end | ... | ... |