Commit 552c6d45 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Make tests green for postgres

parent 9ada6788
...@@ -19,8 +19,7 @@ services: ...@@ -19,8 +19,7 @@ services:
before_script: before_script:
- "cp config/database.yml.$DB config/database.yml" - "cp config/database.yml.$DB config/database.yml"
- "cp config/gitlab.yml.example config/gitlab.yml" - "cp config/gitlab.yml.example config/gitlab.yml"
- "bundle exec rake db:create RAILS_ENV=test" - "bundle exec rake db:setup RAILS_ENV=test"
- "bundle exec rake db:migrate RAILS_ENV=test"
- "bundle exec rake db:seed_fu RAILS_ENV=test" - "bundle exec rake db:seed_fu RAILS_ENV=test"
- "sh -e /etc/init.d/xvfb start" - "sh -e /etc/init.d/xvfb start"
script: "bundle exec rake travis --trace" script: "bundle exec rake travis --trace"
...@@ -124,7 +124,7 @@ group :development, :test do ...@@ -124,7 +124,7 @@ group :development, :test do
gem "capybara" gem "capybara"
gem "pry" gem "pry"
gem "awesome_print" gem "awesome_print"
gem "database_cleaner" gem "database_cleaner", ref: "f89c34300e114be99532f14c115b2799a3380ac6", git: "https://github.com/bmabey/database_cleaner.git"
gem "launchy" gem "launchy"
gem 'factory_girl_rails' gem 'factory_girl_rails'
......
GIT
remote: https://github.com/bmabey/database_cleaner.git
revision: f89c34300e114be99532f14c115b2799a3380ac6
ref: f89c34300e114be99532f14c115b2799a3380ac6
specs:
database_cleaner (0.9.1)
GIT GIT
remote: https://github.com/ctran/annotate_models.git remote: https://github.com/ctran/annotate_models.git
revision: be4e26825b521f0b2d86b181e2dff89901aa9b1e revision: be4e26825b521f0b2d86b181e2dff89901aa9b1e
...@@ -140,7 +147,6 @@ GEM ...@@ -140,7 +147,6 @@ GEM
colorize (0.5.8) colorize (0.5.8)
crack (0.3.1) crack (0.3.1)
daemons (1.1.9) daemons (1.1.9)
database_cleaner (0.9.1)
devise (2.1.2) devise (2.1.2)
bcrypt-ruby (~> 3.0) bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
...@@ -458,7 +464,7 @@ DEPENDENCIES ...@@ -458,7 +464,7 @@ DEPENDENCIES
chosen-rails (= 0.9.8) chosen-rails (= 0.9.8)
coffee-rails (~> 3.2.2) coffee-rails (~> 3.2.2)
colored colored
database_cleaner database_cleaner!
devise (~> 2.1.0) devise (~> 2.1.0)
draper (~> 0.18.0) draper (~> 0.18.0)
email_spec email_spec
......
...@@ -36,8 +36,6 @@ Spinach.hooks.before_scenario do ...@@ -36,8 +36,6 @@ Spinach.hooks.before_scenario do
Gitlab.config.stub(git_base_path: Rails.root.join('tmp', 'test-git-base-path')) Gitlab.config.stub(git_base_path: Rails.root.join('tmp', 'test-git-base-path'))
FileUtils.rm_rf Gitlab.config.git_base_path FileUtils.rm_rf Gitlab.config.git_base_path
FileUtils.mkdir_p Gitlab.config.git_base_path FileUtils.mkdir_p Gitlab.config.git_base_path
DatabaseCleaner.start
end end
Spinach.hooks.after_scenario do Spinach.hooks.after_scenario do
......
...@@ -91,13 +91,13 @@ describe "Issues" do ...@@ -91,13 +91,13 @@ describe "Issues" do
title: title) title: title)
end end
issue = Issue.first # with title 'foobar' @issue = Issue.first # with title 'foobar'
issue.milestone = create(:milestone, project: project) @issue.milestone = create(:milestone, project: project)
issue.assignee = nil @issue.assignee = nil
issue.save @issue.save
end end
let(:issue) { Issue.first } let(:issue) { @issue }
it "should allow filtering by issues with no specified milestone" do it "should allow filtering by issues with no specified milestone" do
visit project_issues_path(project, milestone_id: '0') visit project_issues_path(project, milestone_id: '0')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment