Commit 29cbb2f0 authored by Douwe Maan's avatar Douwe Maan Committed by Robert Speicher

Update specs.

parent b9305369
...@@ -8,7 +8,7 @@ describe Projects::TransferService do ...@@ -8,7 +8,7 @@ describe Projects::TransferService do
context 'namespace -> namespace' do context 'namespace -> namespace' do
before do before do
group.add_owner(user) group.add_owner(user)
@result = transfer_project(project, user, new_namespace_id: group.id) @result = transfer_project(project, user, group)
end end
it { expect(@result).to be_truthy } it { expect(@result).to be_truthy }
...@@ -17,7 +17,7 @@ describe Projects::TransferService do ...@@ -17,7 +17,7 @@ describe Projects::TransferService do
context 'namespace -> no namespace' do context 'namespace -> no namespace' do
before do before do
@result = transfer_project(project, user, new_namespace_id: nil) @result = transfer_project(project, user, nil)
end end
it { expect(@result).to eq false } it { expect(@result).to eq false }
...@@ -26,14 +26,14 @@ describe Projects::TransferService do ...@@ -26,14 +26,14 @@ describe Projects::TransferService do
context 'namespace -> not allowed namespace' do context 'namespace -> not allowed namespace' do
before do before do
@result = transfer_project(project, user, new_namespace_id: group.id) @result = transfer_project(project, user, group)
end end
it { expect(@result).to eq false } it { expect(@result).to eq false }
it { expect(project.namespace).to eq(user.namespace) } it { expect(project.namespace).to eq(user.namespace) }
end end
def transfer_project(project, user, params) def transfer_project(project, user, new_namespace)
Projects::TransferService.new(project, user, params).execute Projects::TransferService.new(project, user).execute(new_namespace)
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment