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:
authorDouwe Maan <douwe@gitlab.com>2015-10-21 11:21:01 +0300
committerDouwe Maan <douwe@gitlab.com>2015-10-21 11:21:01 +0300
commit310f49af35dad496041b21bbb8b05c74c14075ba (patch)
tree310c52410005278973eb231f6a76f1d7ddb246a1 /spec/controllers/projects_controller_spec.rb
parent4a02dfa48f46688acdf03d2901cb4f36364dccdf (diff)
Don't load entire spec with MySQL
Diffstat (limited to 'spec/controllers/projects_controller_spec.rb')
-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