specs: reduce BCrypt complexity during tests
BCrypt is used to compute Instructeur tokens, and takes a surprisingly ong time during specs. Reducing the complexity to speed it up. Speeds up this spec from 0m 57s to 0m 20s.
This commit is contained in:
parent
0a541d678d
commit
5f2233d07d
1 changed files with 6 additions and 0 deletions
|
@ -76,4 +76,10 @@ Rails.application.configure do
|
|||
debounce_delay: 500,
|
||||
status_visible_duration: 500
|
||||
}
|
||||
|
||||
# BCrypt is slow by design - but during tests we want to make it faster
|
||||
# to compute hashes of passwords.
|
||||
silence_warnings do
|
||||
BCrypt::Engine::DEFAULT_COST = BCrypt::Engine::MIN_COST
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue