updated specs for platform API
This commit is contained in:
parent
ec3ea92870
commit
f6e4fda738
|
@ -44,7 +44,7 @@ shared_examples_for 'api platform user with owner rights' do
|
||||||
response.should_not be_success
|
response.should_not be_success
|
||||||
end
|
end
|
||||||
it 'ensures that personal platform has not been destroyed' do
|
it 'ensures that personal platform has not been destroyed' do
|
||||||
lambda { delete :destroy, id: @personal_platform.id, format: :json }.should_not change{ Platform.count }
|
lambda { delete :destroy, id: @personal_platform.id, format: :json }.should change{ Platform.count }.by(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -168,7 +168,7 @@ shared_examples_for 'api platform user without global admin rights' do
|
||||||
response.should_not be_success
|
response.should_not be_success
|
||||||
end
|
end
|
||||||
it "ensures that platform has not been #{action}d" do
|
it "ensures that platform has not been #{action}d" do
|
||||||
lambda { post action, clone_or_create_params }.should_not change{ Platform.count }
|
lambda { post action, clone_or_create_params }.should change{ Platform.count }.by(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -211,7 +211,7 @@ describe Api::V1::PlatformsController, type: :controller do
|
||||||
let(:clone_or_create_params) do
|
let(:clone_or_create_params) do
|
||||||
{ id: @platform.id,
|
{ id: @platform.id,
|
||||||
platform: { description: 'new description', name: 'new_name',
|
platform: { description: 'new description', name: 'new_name',
|
||||||
owner_id: @user.id, distrib_type: APP_CONFIG['distr_types'].first }, format: :json }
|
owner_id: @user.id, distrib_type: APP_CONFIG['distr_types'].first, default_branch: 'new_name' }, format: :json }
|
||||||
end
|
end
|
||||||
before do
|
before do
|
||||||
stub_symlink_methods
|
stub_symlink_methods
|
||||||
|
|
Loading…
Reference in New Issue