Allow remote translation tests to be run offline

The method `available_locales` in
`RemoteTranslations::Microsoft::AvailableLocales` needs to execute a
request to an external server in order to work, meaning it will fail if
the machine its executed on doesn't have an internet connection.

So we're stubbing the method in the tests using it.
This commit is contained in:
Javi Martín
2020-04-20 03:17:39 +02:00
parent e7fcca9b47
commit a20622e2fa
4 changed files with 8 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
require "rails_helper"
describe RemoteTranslationsController do
describe RemoteTranslationsController, :remote_translations do
describe "POST create", :delay_jobs do
let(:debate) { create(:debate) }