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
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/projects_controller_spec.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb
index 0fe9d4da848..9b49f60b66c 100644
--- a/spec/controllers/projects_controller_spec.rb
+++ b/spec/controllers/projects_controller_spec.rb
@@ -68,18 +68,20 @@ describe ProjectsController do
expect(response).to redirect_to("/#{public_project.path_with_namespace}")
end
- context "when there is also a match with the same casing" do
- let!(:other_project) { create(:project, :public, namespace: public_project.namespace, path: public_project.path.upcase) }
+ # MySQL queries are case insensitive by default, so this spec would fail.
+ unless Gitlab::Database.mysql?
+ context "when there is also a match with the same casing" do
- it "loads the exactly matched project" do
- # MySQL queries are case insensitive by default, so this spec would fail.
- skip if Gitlab::Database.mysql?
+ let!(:other_project) { create(:project, :public, namespace: public_project.namespace, path: public_project.path.upcase) }
- get :show, namespace_id: public_project.namespace.path, id: public_project.path.upcase
+ it "loads the exactly matched project" do
- expect(assigns(:project)).to eq(other_project)
- expect(response.status).to eq(200)
+ get :show, namespace_id: public_project.namespace.path, id: public_project.path.upcase
+
+ expect(assigns(:project)).to eq(other_project)
+ expect(response.status).to eq(200)
+ end
end
end
end