Commit c110c9bd authored by James Lopez's avatar James Lopez

refactored spec

parent 5255a54d
...@@ -14,10 +14,17 @@ describe GitPushService, services: true do ...@@ -14,10 +14,17 @@ describe GitPushService, services: true do
end end
describe 'Push branches' do describe 'Push branches' do
let(:oldrev) { @oldrev }
let(:newrev) { @newrev }
subject do
execute_service(project, user, oldrev, newrev, @ref )
end
context 'new branch' do context 'new branch' do
subject do
execute_service(project, user, @blankrev, @newrev, @ref ) let(:oldrev) { @blankrev }
end
it { is_expected.to be_truthy } it { is_expected.to be_truthy }
...@@ -35,9 +42,6 @@ describe GitPushService, services: true do ...@@ -35,9 +42,6 @@ describe GitPushService, services: true do
end end
context 'existing branch' do context 'existing branch' do
subject do
execute_service(project, user, @oldrev, @newrev, @ref )
end
it { is_expected.to be_truthy } it { is_expected.to be_truthy }
...@@ -49,9 +53,8 @@ describe GitPushService, services: true do ...@@ -49,9 +53,8 @@ describe GitPushService, services: true do
end end
context 'rm branch' do context 'rm branch' do
subject do
execute_service(project, user, @oldrev, @blankrev, @ref ) let(:newrev) { @blankrev }
end
it { is_expected.to be_truthy } it { is_expected.to be_truthy }
......
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