Skip to content

Commit

Permalink
Don't raise secret token generation error during tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyken committed Jan 7, 2014
1 parent 71a99f1 commit 6e1624e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/initializers/secret_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
# We should setup a secret token if FFCRM is running in application mode but NOT in engine mode.
# This functionality has been extracted to lib so it can be tested.
if FatFreeCRM.application? and !Rails.env.test?
if FatFreeCRM.application?
require 'fat_free_crm/secret_token_generator'
FatFreeCRM::SecretTokenGenerator.setup!
end
2 changes: 1 addition & 1 deletion lib/fat_free_crm/secret_token_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def setup!
generate_and_persist_token!
end
FatFreeCRM::Application.config.secret_token = token
raise(FAIL_MESSAGE) if FatFreeCRM::Application.config.secret_token.blank?
raise(FAIL_MESSAGE) if FatFreeCRM::Application.config.secret_token.blank?# and !Rails.env.test?
end

private
Expand Down

0 comments on commit 6e1624e

Please sign in to comment.