diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-05-13 22:11:49 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-05-13 22:11:49 +0200 |
commit | 3baacf6993581ba91e3e3ae0071b25a645d71115 (patch) | |
tree | ec1dbae77aef8bd43e6f5cfef41dfbc72f133ca3 /spec/controllers/concerns | |
parent | 559214c33fc0c5b5ee621eb2719fa1a15ac9da95 (diff) | |
parent | 92f85bea528c5eca97a2f075c53f7dcafdf5cb41 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'spec/controllers/concerns')
-rw-r--r-- | spec/controllers/concerns/localized_spec.rb | 8 |
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 |