Skip to content

Commit

Permalink
test placeholder correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
bodrovis committed Aug 17, 2022
1 parent 2528c62 commit 45ea245
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
29 changes: 17 additions & 12 deletions spec/fixtures/vcr_cassettes/import.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions spec/lib/lokalise_manager/task_definitions/importer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,14 @@

expect(result).to be true

expect(count_translations).to eq(24)
expect_file_exist loc_path, 'en_1.yml'
expect_file_exist loc_path, 'ru_2.yml'
expect(count_translations).to eq(5)
expect_file_exist loc_path, 'en.yaml'
expect_file_exist loc_path, 'fr.yaml'

trans_data = YAML.load_file(File.join(loc_path, 'en.yaml'))
# rubocop:disable Style/FormatStringToken
expect(trans_data['en']['welcome']).to eq('Welcome to the app, %{username}')
# rubocop:enable Style/FormatStringToken
end

it 'runs import successfully but does not provide any output when silent_mode is enabled' do
Expand All @@ -129,8 +134,8 @@
end

expect(result).to be true
expect_file_exist loc_path, 'en_1.yml'
expect_file_exist loc_path, 'ru_2.yml'
expect_file_exist loc_path, 'en.yaml'
expect_file_exist loc_path, 'fr.yaml'
expect(described_object.config).to have_received(:silent_mode).at_most(1).times
end
end
Expand Down

0 comments on commit 45ea245

Please sign in to comment.