reset cached access tokens in api specs

this allows once-ler to work in api specs by
resetting the user access tokens cache in the
global before :each block

Change-Id: I580007a17129e3e4b96f6310113e1578b5e63544
Reviewed-on: https://gerrit.instructure.com/37553
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
This commit is contained in:
Cameron Sutter 2014-07-11 09:25:57 -06:00
parent 85136aca96
commit 0f5c76f422
1 changed files with 1 additions and 0 deletions

View File

@ -475,6 +475,7 @@ end
Delayed::Job.redis.flushdb if Delayed::Job == Delayed::Backend::Redis::Job
Rails::logger.try(:info, "Running #{self.class.description} #{@method_name}")
Attachment.domain_namespace = nil
$spec_api_tokens = {}
end
# flush redis before the first spec, and before each spec that comes after