diff --git a/app/models/environment.rb b/app/models/environment.rb index 7f561ac..6ae9ec8 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -20,7 +20,7 @@ class Environment < ActiveRecord::Base end NUMBER_OF_BOXES = 4 - + PERMISSIONS['Environment'] = { 'view_environment_admin_panel' => N_('View environment admin panel'), 'edit_environment_features' => N_('Edit environment features'), diff --git a/features/step_definitions/noosfero_steps.rb b/features/step_definitions/noosfero_steps.rb index 434b7bc..af6f7ba 100644 --- a/features/step_definitions/noosfero_steps.rb +++ b/features/step_definitions/noosfero_steps.rb @@ -94,8 +94,8 @@ Given /^the following blocks$/ do |table| owner.boxes<< Box.new owner.boxes.first.blocks << MainBlock.new end - box_id = owner.boxes.where(:position => [3]) - klass.constantize.create!(item.merge(:box_id => box_id)) + box = owner.boxes.where(:position => 3).first + klass.constantize.create!(item.merge(:box => box)) end end -- libgit2 0.21.2