From fa71bd2a68ad7be210413c333af0a99558ff0160 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 20 Mar 2014 22:54:40 +0600 Subject: [PATCH] [#345] fix platform api specs --- spec/controllers/api/v1/platforms_controller_spec.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spec/controllers/api/v1/platforms_controller_spec.rb b/spec/controllers/api/v1/platforms_controller_spec.rb index 451fbdc6c..b30d0f061 100644 --- a/spec/controllers/api/v1/platforms_controller_spec.rb +++ b/spec/controllers/api/v1/platforms_controller_spec.rb @@ -162,7 +162,6 @@ shared_examples_for 'api platform user without global admin rights' do [:create, :clone].each do |action| context "api platform user without #{action} rights" do - before { any_instance_of(Platform, create_directory: true) } it "should not be able to perform #{action} action" do post action, clone_or_create_params response.should_not be_success @@ -349,10 +348,8 @@ describe Api::V1::PlatformsController do [:clone, :create].each do |action| context "with #{action} rights" do - before do - any_instance_of(Platform, create_directory: true) - clone_or_create_params[:platform][:owner_id] = @admin.id - end + before { clone_or_create_params[:platform][:owner_id] = @admin.id } + it "should be able to perform #{action} action" do post action, clone_or_create_params response.should be_success