Skip to content

Commit

Permalink
Use memory cache in test env, manually clear it for ldap_role
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpierce committed Jan 25, 2022
1 parent 2eb90ff commit 1b94f7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
config.eager_load = true

# Disable cache storage during tests
config.cache_store = :null_store
config.cache_store = :memory_store

# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
Expand Down
1 change: 1 addition & 0 deletions spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
shared_examples "ldap_role behavior" do |method|
describe "performs group lookup", :clean do
before do
Rails.cache.clear
groups1 = ['groupA', 'groupB']
groups2 = ['groupB', 'groupC']
allow(user).to receive(:member_of_ldap_group?).with(groups1).and_return(true)
Expand Down

0 comments on commit 1b94f7c

Please sign in to comment.