Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed May 10, 2020
1 parent 5703ef9 commit 4838e48
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/controllers/concerns/localized_spec.rb
Expand Up @@ -16,10 +16,16 @@ def success
end

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
Expand Down

0 comments on commit 4838e48

Please sign in to comment.