about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-05-11 01:09:21 +0200
committerGitHub <noreply@github.com>2020-05-11 01:09:21 +0200
commit4bcef12bad8f554f3b0fc2fc34b7d4ca4cc567db (patch)
tree2bf5fb2eb81f92549ae2ca5a925a559260463f3c /spec
parent4b2d9b8a558190f8ccc51cfe67f5e151f2c3342b (diff)
Fix sr locale being selected over sr-Latn (#13693)
* Fix sr locale being selected over sr-Latn

* Update tests
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/concerns/localized_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/controllers/concerns/localized_spec.rb b/spec/controllers/concerns/localized_spec.rb
index 7635d10e1..a89e24af0 100644
--- a/spec/controllers/concerns/localized_spec.rb
+++ b/spec/controllers/concerns/localized_spec.rb
@@ -17,9 +17,15 @@ describe ApplicationController, type: :controller do
 
   shared_examples 'default locale' do
     it 'sets available and preferred language' do
+      request.headers['Accept-Language'] = 'sr-Latn'
+      get 'success'
+      expect(response.body).to eq 'sr-Latn'
+    end
+
+    it 'sets available and preferred language' do
       request.headers['Accept-Language'] = 'ca-ES, fa'
       get 'success'
-      expect(response.body).to eq 'fa'
+      expect(response.body).to eq 'ca'
     end
 
     it 'sets available and compatible language if none of available languages are preferred' do