diff options
| author | Douwe Maan <douwe@gitlab.com> | 2017-09-11 09:40:59 +0000 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2017-09-11 09:40:59 +0000 |
| commit | 5cc140b202a0fc9bf2056b481c977bbcf9255919 (patch) | |
| tree | 6addace4503068db70271bb3fe1e5993ff3f263b /spec/helpers | |
| parent | 2071671cd0deb39ab29dda7d04e48a649c3643cb (diff) | |
| parent | 83355336dd405a3af9914a6ae6d397a631847e49 (diff) | |
| download | gitlab-ce-5cc140b202a0fc9bf2056b481c977bbcf9255919.tar.gz | |
Merge branch 'user-recent-push' into 'master'
Rework how recent push events are retrieved
Closes #35990
See merge request !13995
Diffstat (limited to 'spec/helpers')
| -rw-r--r-- | spec/helpers/projects_helper_spec.rb | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index 49cb7c954b4..1437479831e 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -313,23 +313,10 @@ describe ProjectsHelper do it 'returns recent push on the current project' do event = double(:event) - expect(user).to receive(:recent_push).with([project.id]).and_return(event) + expect(user).to receive(:recent_push).with(project).and_return(event) expect(helper.last_push_event).to eq(event) end - - context 'when current user has a fork of the current project' do - let(:fork) { double(:fork, id: 2) } - - it 'returns recent push considering fork events' do - expect(user).to receive(:fork_of).with(project).and_return(fork) - - event_on_fork = double(:event) - expect(user).to receive(:recent_push).with([project.id, fork.id]).and_return(event_on_fork) - - expect(helper.last_push_event).to eq(event_on_fork) - end - end end describe "#project_feature_access_select" do |
