Skip to content

Commit da18f43

Browse files
committed
Fix unit tests accordingly
1 parent 0f69c80 commit da18f43

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

spec/ios_download_strings_files_from_glotpress_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def test_gp_download(filters:, tablename:, expected_gp_params:)
7070
stub = gp_stub(locale: 'unknown-locale', query: { 'filters[status]': 'current', format: 'strings' }).to_return(status: [404, 'Not Found'])
7171
error_messages = []
7272
allow(FastlaneCore::UI).to receive(:error) { |message| error_messages.append(message) }
73+
allow(FastlaneCore::UI).to receive(:confirm).and_return(false) # as we will be asked if we want to retry when getting a network error
7374

7475
# Act
7576
run_described_fastlane_action(

spec/ios_l10n_helper_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ def file_encoding(path)
260260
stub = stub_request(:get, "#{gp_fake_url}/invalid/default/export-translations/").with(query: { format: 'strings' }).to_return(status: [404, 'Not Found'])
261261
error_messages = []
262262
allow(FastlaneCore::UI).to receive(:error) { |message| error_messages.append(message) }
263+
allow(FastlaneCore::UI).to receive(:confirm).and_return(false) # as we will be asked if we want to retry when getting a network error
263264
dest = StringIO.new
264265
# Act
265266
described_class.download_glotpress_export_file(project_url: gp_fake_url, locale: 'invalid', filters: nil, destination: dest)

0 commit comments

Comments
 (0)