summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-02-17 18:29:43 +0100
committerJames Lopez <james@jameslopez.es>2016-02-17 18:29:43 +0100
commitc110c9bd7f2fabb5c9397291f1f13c6accab70e6 (patch)
tree7e848929421f3c14c1784284bf1a209a63939e8b /spec/services
parent5255a54df9778b107734a84acb85230d62d3cff7 (diff)
downloadgitlab-ce-c110c9bd7f2fabb5c9397291f1f13c6accab70e6.tar.gz
refactored spec
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/git_push_service_spec.rb21
1 files changed, 12 insertions, 9 deletions
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb
index 48e796b6946..994585fb32c 100644
--- a/spec/services/git_push_service_spec.rb
+++ b/spec/services/git_push_service_spec.rb
@@ -14,10 +14,17 @@ describe GitPushService, services: true do
end
describe 'Push branches' do
+
+ let(:oldrev) { @oldrev }
+ let(:newrev) { @newrev }
+
+ subject do
+ execute_service(project, user, oldrev, newrev, @ref )
+ end
+
context 'new branch' do
- subject do
- execute_service(project, user, @blankrev, @newrev, @ref )
- end
+
+ let(:oldrev) { @blankrev }
it { is_expected.to be_truthy }
@@ -35,9 +42,6 @@ describe GitPushService, services: true do
end
context 'existing branch' do
- subject do
- execute_service(project, user, @oldrev, @newrev, @ref )
- end
it { is_expected.to be_truthy }
@@ -49,9 +53,8 @@ describe GitPushService, services: true do
end
context 'rm branch' do
- subject do
- execute_service(project, user, @oldrev, @blankrev, @ref )
- end
+
+ let(:newrev) { @blankrev }
it { is_expected.to be_truthy }