about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-05-08 17:10:50 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-05-08 23:10:50 +0200
commit7a7d12d27f16370c3789aa97514da25c6e91ae4c (patch)
tree4c908050df715f94d06d4728a0d203a19de911b0 /spec
parentcd830a2fab3f3c640daeb55e024324b56c079557 (diff)
Delegate Account#user_locale method and allow nil (#2927)
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/language_detector_spec.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/lib/language_detector_spec.rb b/spec/lib/language_detector_spec.rb
index bd4e65ef8..18ab5aee6 100644
--- a/spec/lib/language_detector_spec.rb
+++ b/spec/lib/language_detector_spec.rb
@@ -43,16 +43,14 @@ describe LanguageDetector do
 
       describe 'with an account' do
         it 'uses the account locale when present' do
-          user    = double(:user, locale: 'fr')
-          account = double(:account, user: user)
+          account = double(user_locale: 'fr')
           result  = described_class.new('', account).to_iso_s
 
           expect(result).to eq :fr
         end
 
         it 'uses default locale when account is present but has no locale' do
-          user    = double(:user, locale: nil)
-          account = double(:accunt, user: user)
+          account = double(user_locale: nil)
           result  = described_class.new('', account).to_iso_s
 
           expect(result).to eq :en