summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-11-07 14:34:12 +0100
committerJarka Kadlecova <jarka@gitlab.com>2017-11-07 14:34:12 +0100
commitad6e650262c1c152fe5e7d7a09607286b8f9f750 (patch)
tree192ea48a0061418c6802629231dfbbc02098af52 /spec
parentdc1e6b436268c00bd1fdf3d15597a4656e029b95 (diff)
downloadgitlab-ce-ad6e650262c1c152fe5e7d7a09607286b8f9f750.tar.gz
Refactor issuables index actions
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/concerns/issuable_collections_spec.rb54
1 files changed, 0 insertions, 54 deletions
diff --git a/spec/controllers/concerns/issuable_collections_spec.rb b/spec/controllers/concerns/issuable_collections_spec.rb
index c9687af4dd2..cd3bf785d34 100644
--- a/spec/controllers/concerns/issuable_collections_spec.rb
+++ b/spec/controllers/concerns/issuable_collections_spec.rb
@@ -17,60 +17,6 @@ describe IssuableCollections do
controller
end
- describe '#redirect_out_of_range' do
- before do
- allow(controller).to receive(:url_for)
- end
-
- it 'returns true and redirects if the offset is out of range' do
- relation = double(:relation, current_page: 10)
-
- expect(controller).to receive(:redirect_to)
- expect(controller.send(:redirect_out_of_range, relation, 2)).to eq(true)
- end
-
- it 'returns false if the offset is not out of range' do
- relation = double(:relation, current_page: 1)
-
- expect(controller).not_to receive(:redirect_to)
- expect(controller.send(:redirect_out_of_range, relation, 2)).to eq(false)
- end
- end
-
- describe '#issues_page_count' do
- it 'returns the number of issue pages' do
- project = create(:project, :public)
-
- create(:issue, project: project)
-
- finder = IssuesFinder.new(user)
- issues = finder.execute
-
- allow(controller).to receive(:issues_finder)
- .and_return(finder)
-
- expect(controller.send(:issues_page_count, issues)).to eq(1)
- end
- end
-
- describe '#merge_requests_page_count' do
- it 'returns the number of merge request pages' do
- project = create(:project, :public)
-
- create(:merge_request, source_project: project, target_project: project)
-
- finder = MergeRequestsFinder.new(user)
- merge_requests = finder.execute
-
- allow(controller).to receive(:merge_requests_finder)
- .and_return(finder)
-
- pages = controller.send(:merge_requests_page_count, merge_requests)
-
- expect(pages).to eq(1)
- end
- end
-
describe '#page_count_for_relation' do
it 'returns the number of pages' do
relation = double(:relation, limit_value: 20)