2020-02-20 19:13:14 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2021-01-08 20:13:17 +00:00
|
|
|
describe '/app/login', type: :request do
|
|
|
|
context 'without DEFAULT_LOCALE' do
|
2020-02-20 19:13:14 +00:00
|
|
|
it 'renders the dashboard' do
|
2021-01-08 20:13:17 +00:00
|
|
|
get '/app/login'
|
2020-02-20 19:13:14 +00:00
|
|
|
expect(response).to have_http_status(:success)
|
|
|
|
end
|
|
|
|
end
|
2021-01-08 20:13:17 +00:00
|
|
|
|
|
|
|
context 'with DEFAULT_LOCALE' do
|
|
|
|
it 'renders the dashboard' do
|
|
|
|
ENV['DEFAULT_LOCALE'] = 'pt_BR'
|
|
|
|
get '/app/login'
|
|
|
|
expect(response).to have_http_status(:success)
|
|
|
|
expect(response.body).to include "selectedLocale: 'pt_BR'"
|
|
|
|
ENV['DEFAULT_LOCALE'] = 'en'
|
|
|
|
end
|
|
|
|
end
|
2020-02-20 19:13:14 +00:00
|
|
|
end
|