diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-03 11:47:56 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-03 11:47:56 +0300 |
commit | c31b703110620c438d724561ab6d5a5a44b08e19 (patch) | |
tree | 5e2f09fe04cf30eebadd6ec2dba090e6f56fc256 /spec/finders | |
parent | 9b598fa62d73c5a66d7fed872db943859e2d6a5a (diff) | |
download | gitlab-ce-c31b703110620c438d724561ab6d5a5a44b08e19.tar.gz |
Fix tests that dont respect project-fork relation
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/merge_requests_finder_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/finders/merge_requests_finder_spec.rb b/spec/finders/merge_requests_finder_spec.rb index 0bd2ccafcc1..94b4d4c4ff4 100644 --- a/spec/finders/merge_requests_finder_spec.rb +++ b/spec/finders/merge_requests_finder_spec.rb @@ -5,10 +5,10 @@ describe MergeRequestsFinder do let(:user2) { create :user } let(:project1) { create(:project) } - let(:project2) { create(:project) } + let(:project2) { create(:project, forked_from_project: project1) } - let!(:merge_request1) { create(:merge_request, :simple, author: user, source_project: project1, target_project: project2) } - let!(:merge_request2) { create(:merge_request, :simple, author: user, source_project: project2, target_project: project1) } + let!(:merge_request1) { create(:merge_request, :simple, author: user, source_project: project2, target_project: project1) } + let!(:merge_request2) { create(:merge_request, :simple, author: user, source_project: project2, target_project: project1, state: 'closed') } let!(:merge_request3) { create(:merge_request, :simple, author: user, source_project: project2, target_project: project2) } before do @@ -21,7 +21,7 @@ describe MergeRequestsFinder do it 'should filter by scope' do params = { scope: 'authored', state: 'opened' } merge_requests = MergeRequestsFinder.new.execute(user, params) - merge_requests.size.should == 3 + merge_requests.size.should == 2 end it 'should filter by project' do |