BigW Consortium Gitlab
Speed up security feature specs Before: `rspec spec/features/security/ 0.12s user 0.04s system 0% cpu 3:38.00 total` After: `rspec spec/features/security/ 0.12s user 0.04s system 0% cpu 1:40.58 total` The majority of the speed improvements is from two things: 1. Instead of using our standard `login_as` helper in the matchers, we take advantage of the `Warden::Test::Helpers` version of the method which bypasses the login form and logs the user in directly. We were essentially testing that filling out the login form works hundreds of times. 2. There were many tests that verified if a user of a certain access level (master, owner, reporter, guest) had access to a resource. Unfortunately we were creating every type of user for each test even though a test was only verifying one of them at a time. Now the tests only create the one user role they're testing. See merge request !1023
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
matchers | Loading commit data... | |
api_helpers.rb | Loading commit data... | |
capybara.rb | Loading commit data... | |
capybara_helpers.rb | Loading commit data... | |
db_cleaner.rb | Loading commit data... | |
factory_girl.rb | Loading commit data... | |
filter_spec_helper.rb | Loading commit data... | |
login_helpers.rb | Loading commit data... | |
mentionable_shared_examples.rb | Loading commit data... | |
repo_helpers.rb | Loading commit data... | |
select2_helper.rb | Loading commit data... | |
stub_configuration.rb | Loading commit data... | |
taskable_shared_examples.rb | Loading commit data... | |
test_env.rb | Loading commit data... | |
webmock.rb | Loading commit data... |