Make tests green for postgres
This commit is contained in:
parent
9ada678819
commit
552c6d4598
5 changed files with 15 additions and 12 deletions
|
@ -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"
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -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'
|
||||||
|
|
||||||
|
|
10
Gemfile.lock
10
Gemfile.lock
|
@ -1,3 +1,10 @@
|
||||||
|
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
|
||||||
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
|
||||||
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
|
||||||
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
|
||||||
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')
|
||||||
|
|
Loading…
Reference in a new issue