diff options
author | Izaak Alpert <ialpert@blackberry.com> | 2013-07-18 00:28:07 +0400 |
---|---|---|
committer | Izaak Alpert <ialpert@blackberry.com> | 2013-07-18 06:48:03 +0400 |
commit | 58064027408bcbfb9e6216a3157dffd9c324848d (patch) | |
tree | a3ec8c2a4510ae5f26d435135316b1a61afda3b9 /spec | |
parent | 0e82c98174618c77e75153884269b5a02850c1d0 (diff) |
Raise Error for diff_between/commit_between for non fork mr's in satellite
-Fixed tests to account for this
-Trigger update after update_branches for list:update selecting first commit, have it also trigger sha lookup
Change-Id: Ie4c3d4fbf57aeadd7d141d3704f4ea0f0684a7a5
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/satellite/merge_action_spec.rb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/spec/lib/gitlab/satellite/merge_action_spec.rb b/spec/lib/gitlab/satellite/merge_action_spec.rb index 2478efe8493..98e475e715d 100644 --- a/spec/lib/gitlab/satellite/merge_action_spec.rb +++ b/spec/lib/gitlab/satellite/merge_action_spec.rb @@ -38,16 +38,14 @@ describe 'Gitlab::Satellite::MergeAction' do end context 'between branches' do - it 'should get proper commits between' do + it 'should raise exception -- not expected to be used by non forks' do merge_request.target_branch = @one_after_stable[0] merge_request.source_branch = @master[0] - commits = Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).commits_between - verify_commits(commits, @one_after_stable[1], @master[1]) + expect {Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).commits_between}.to raise_error merge_request.target_branch = @wiki_branch[0] merge_request.source_branch = @master[0] - commits = Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).commits_between - verify_commits(commits, @wiki_branch[1], @master[1]) + expect {Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).commits_between}.to raise_error end end end @@ -104,13 +102,7 @@ describe 'Gitlab::Satellite::MergeAction' do it 'should get proper diffs' do merge_request.target_branch = @close_commit1[0] merge_request.source_branch = @master[0] - diffs = Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).diffs_between_satellite - - merge_request.target_branch = @close_commit1[0] - merge_request.source_branch = @master[0] - diff = Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).diff_in_satellite - - is_a_matching_diff(diff, diffs) + expect{Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).diffs_between_satellite}.to raise_error end end end |