From 6d465d99c1ddbff000a3760bcfb8a069a41271b5 Mon Sep 17 00:00:00 2001 From: Luciano Prestes Cavalcanti Date: Wed, 19 Nov 2014 16:54:27 -0200 Subject: [PATCH] Fix mpog_software_plugin_myprofile_controller_test.rb --- test/functional/mpog_software_plugin_myprofile_controller_test.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/functional/mpog_software_plugin_myprofile_controller_test.rb b/test/functional/mpog_software_plugin_myprofile_controller_test.rb index ac661ea..80873bb 100644 --- a/test/functional/mpog_software_plugin_myprofile_controller_test.rb +++ b/test/functional/mpog_software_plugin_myprofile_controller_test.rb @@ -23,9 +23,9 @@ class MpogSoftwarePluginMyprofileControllerTest < ActionController::TestCase OperatingSystemName.create(:name=>"Debian") login_as(@person.user.login) - @e = Environment.default - @e.enable_plugin('MpogSoftwarePlugin') - @e.save! + @environment = Environment.default + @environment.enable_plugin('MpogSoftwarePlugin') + @environment.save! end attr_accessor :person, :offer @@ -66,7 +66,8 @@ class MpogSoftwarePluginMyprofileControllerTest < ActionController::TestCase should 'create a new software with all fields filled in' do fields = software_fields - post :new_software, :profile => person.identifier, :community => fields[1], :license_info => fields[0], + @environment.add_admin(@person) + post :new_software, :profile => @person.identifier, :community => fields[1], :license_info => fields[0], :software_info => fields[2] assert_equal SoftwareInfo.last.community.name, "Debian" end -- libgit2 0.21.2