summaryrefslogtreecommitdiff
path: root/spec/helpers/todos_helper_spec.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-03-21 15:25:00 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-03-21 15:25:00 +0000
commit1974691bfe372f805a635319a8f7dbd6e0537485 (patch)
treebd4bf0c17f74e6b12c1859f0b87dc76a545c7222 /spec/helpers/todos_helper_spec.rb
parentdb8f52d4014b489eb11c8408db262a9329c8800d (diff)
downloadgitlab-ce-1974691bfe372f805a635319a8f7dbd6e0537485.tar.gz
Revert "Merge branch '29534-todos-performance' into 'master'"
This reverts merge request !10076
Diffstat (limited to 'spec/helpers/todos_helper_spec.rb')
-rw-r--r--spec/helpers/todos_helper_spec.rb34
1 files changed, 0 insertions, 34 deletions
diff --git a/spec/helpers/todos_helper_spec.rb b/spec/helpers/todos_helper_spec.rb
index 21e0e74e008..50060a0925d 100644
--- a/spec/helpers/todos_helper_spec.rb
+++ b/spec/helpers/todos_helper_spec.rb
@@ -1,40 +1,6 @@
require "spec_helper"
describe TodosHelper do
- include GitlabRoutingHelper
-
- describe '#todo_target_path' do
- let(:project) { create(:project) }
- let(:merge_request) { create(:merge_request, target_project: project, source_project: project) }
- let(:issue) { create(:issue, project: project) }
- let(:note) { create(:note_on_issue, noteable: issue, project: project) }
-
- let(:mr_todo) { build(:todo, project: project, target: merge_request) }
- let(:issue_todo) { build(:todo, project: project, target: issue) }
- let(:note_todo) { build(:todo, project: project, target: issue, note: note) }
- let(:build_failed_todo) { build(:todo, :build_failed, project: project, target: merge_request) }
-
- it 'returns correct path to the todo MR' do
- expect(todo_target_path(mr_todo)).
- to eq("/#{project.full_path}/merge_requests/#{merge_request.iid}")
- end
-
- it 'returns correct path to the todo issue' do
- expect(todo_target_path(issue_todo)).
- to eq("/#{project.full_path}/issues/#{issue.iid}")
- end
-
- it 'returns correct path to the todo note' do
- expect(todo_target_path(note_todo)).
- to eq("/#{project.full_path}/issues/#{issue.iid}#note_#{note.id}")
- end
-
- it 'returns correct path to build_todo MR when pipeline failed' do
- expect(todo_target_path(build_failed_todo)).
- to eq("/#{project.full_path}/merge_requests/#{merge_request.iid}/pipelines")
- end
- end
-
describe '#todo_projects_options' do
let(:projects) { create_list(:empty_project, 3) }
let(:user) { create(:user) }