As of Rails 5.1:
- Rails has built-in support for running tests within database
transactions, so Database Cleaner is no longer needed for this.
- Rails automatically shares the database connection across threads,
so transactional_capybara is no longer needed.
Changes:
- Enable `use_transactional_tests`.
- Remove transactional_capybara.
- Remove the Database Cleaner test wrapper.
This resolves:
- transactional_capybara mismanages the shared database connection,
causing the connection to falsely report as idle after the first
test. At 6 minutes (idle_timeout + reaping_frequency) into testing,
the connection is closed, causing e.g. `PG::ConnectionBad` errors.
Presumably the intent of this was to clear the database and repopulate
it with seed data. `transaction` isn't the right strategy for this; it
just rolls back any existing transactions.
Resolves#2557:
$ docker-compose run --rm osem bundle exec rspec --tag js
…
WebMock::NetConnectNotAllowedError
See titusfortner/webdrivers#109 for details.
The cop enforces use of self assignment operator E.g. a=a+2 gets
written as a+=2. Also the offenses listed in rubocop.todo.yml
have been corrected automatically with the --auto-correct option.
Fixes issue #1531
The spec for omniauth doesn't test signup for every provider, and it
doesn't test if it has tests for all available providers
Also, we no longer use secrets
* Add model test to check if the omniauth providers have changed
* Test signup using every provider
* Replace secretswith environment variables
The names and usernames don't follow a canonical pattern
And the emails point to a valid domain not owned by osem and not
reserved for illustration purposes
Normalize the users' names and usernames and change the domain of the
email addresses to example.com
Fix#1365
Move all what is related to the DatabaseCleaner to the
database_cleaner.rb file. Load the seeds only when they have been
deleted and not before every test.
By default the lint will be run before every test suit.
Set it to false in config.yml if you would rather just use the rake
task: `bundle exec rake factory_girl:lint`