Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/presenters/clusterable_presenter_spec.rb')
-rw-r--r--spec/presenters/clusterable_presenter_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/presenters/clusterable_presenter_spec.rb b/spec/presenters/clusterable_presenter_spec.rb
index 47ccc59ae45..2c0a7f3e9b2 100644
--- a/spec/presenters/clusterable_presenter_spec.rb
+++ b/spec/presenters/clusterable_presenter_spec.rb
@@ -87,4 +87,20 @@ describe ClusterablePresenter do
it { is_expected.to be_nil }
end
+
+ describe '#index_path' do
+ let(:clusterable) { create(:group) }
+
+ context 'without options' do
+ subject { described_class.new(clusterable).index_path }
+
+ it { is_expected.to eq(group_clusters_path(clusterable)) }
+ end
+
+ context 'with options' do
+ subject { described_class.new(clusterable).index_path(format: :json) }
+
+ it { is_expected.to eq(group_clusters_path(clusterable, format: :json)) }
+ end
+ end
end