diff options
author | ThibG <thib@sitedethib.com> | 2020-05-13 23:46:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 23:46:09 +0200 |
commit | e1d282023432ff4a88cb795f3a9889704314e448 (patch) | |
tree | 89f9525142d0bf876a4fb6e0117163c0a76bb78a /spec/controllers/concerns | |
parent | c6ff4c634caf718adf7280e04909c091d15add1d (diff) | |
parent | d147dd7588502f22ac825780bb1d6e54eb3613e6 (diff) |
Merge pull request #1327 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
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 |