Commit 6d465d99c1ddbff000a3760bcfb8a069a41271b5

Authored by Luciano Prestes
1 parent e092f472

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>
test/functional/mpog_software_plugin_myprofile_controller_test.rb
@@ -23,9 +23,9 @@ class MpogSoftwarePluginMyprofileControllerTest &lt; ActionController::TestCase @@ -23,9 +23,9 @@ class MpogSoftwarePluginMyprofileControllerTest &lt; ActionController::TestCase
23 OperatingSystemName.create(:name=>"Debian") 23 OperatingSystemName.create(:name=>"Debian")
24 24
25 login_as(@person.user.login) 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 end 29 end
30 30
31 attr_accessor :person, :offer 31 attr_accessor :person, :offer
@@ -66,7 +66,8 @@ class MpogSoftwarePluginMyprofileControllerTest &lt; ActionController::TestCase @@ -66,7 +66,8 @@ class MpogSoftwarePluginMyprofileControllerTest &lt; ActionController::TestCase
66 66
67 should 'create a new software with all fields filled in' do 67 should 'create a new software with all fields filled in' do
68 fields = software_fields 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 :software_info => fields[2] 71 :software_info => fields[2]
71 assert_equal SoftwareInfo.last.community.name, "Debian" 72 assert_equal SoftwareInfo.last.community.name, "Debian"
72 end 73 end