Improve display remote translation button

- Do not display remote translations button when API key is not configured
This commit is contained in:
taitus
2019-12-27 18:40:53 +01:00
parent a3a7a07ea4
commit 086e38c969
4 changed files with 18 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ shared_examples "remotely_translatable" do |factory_name, path_name, path_argume
available_locales_response = %w[de en es fr pt zh-Hans]
expect(RemoteTranslations::Microsoft::AvailableLocales).to receive(:available_locales).at_most(3).times.
and_return(available_locales_response)
allow(Rails.application.secrets).to receive(:microsoft_api_key).and_return("123")
end
context "Button to request remote translation" do