summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-05-12 18:26:01 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-05-12 18:27:59 +0300
commitbbd1be002b15ad50b559c217c4e2f9d50a79ef20 (patch)
tree781f7cebf2f7aaa25568f5c0d60f0eebfe1f38d1 /spec
parent1028e05378f1fd25b49d95f36cf577a2b819844d (diff)
downloadgitlab-ce-bbd1be002b15ad50b559c217c4e2f9d50a79ef20.tar.gz
Change project list cache key to use route.cache_key instead of namespacedz-project-list-cache-key
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/projects_helper_spec.rb10
-rw-r--r--spec/models/namespace_spec.rb6
2 files changed, 2 insertions, 14 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb
index ceabf0caf31..54c5ba57bdf 100644
--- a/spec/helpers/projects_helper_spec.rb
+++ b/spec/helpers/projects_helper_spec.rb
@@ -66,14 +66,8 @@ describe ProjectsHelper do
describe "#project_list_cache_key", redis: true do
let(:project) { create(:project) }
- it "includes the namespace" do
- expect(helper.project_list_cache_key(project)).to include(project.namespace.cache_key)
- end
-
- it "includes the parent namespace in case of subgroup" do
- project = create(:project, group: create(:group, :nested))
-
- expect(helper.project_list_cache_key(project)).to include("parent/#{project.namespace.parent.path}")
+ it "includes the route" do
+ expect(helper.project_list_cache_key(project)).to include(project.route.cache_key)
end
it "includes the project" do
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb
index ca61e34b78e..8624616316c 100644
--- a/spec/models/namespace_spec.rb
+++ b/spec/models/namespace_spec.rb
@@ -332,10 +332,4 @@ describe Namespace, models: true do
it { expect(group.all_projects.to_a).to eq([project2, project1]) }
end
-
- describe '#parent_full_path' do
- let(:namespace) { create(:group, :nested) }
-
- it { expect(namespace.parent_full_path).to eq(namespace.parent.path) }
- end
end