Skip to content

Commit 7ff91d8

Browse files
author
Rynaard Burger
committed
Add unit test for action
1 parent d5cd729 commit 7ff91d8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
require 'spec_helper'
2+
3+
describe Fastlane::Actions::BundletoolGenerateUniversalSignedApkAction do
4+
let(:aab_path) { 'path/to/app.aab' }
5+
let(:apk_output_path) { 'path/to/output' }
6+
let(:keystore_path) { 'path/to/keystore' }
7+
let(:keystore_password) { 'keystore_password' }
8+
let(:keystore_key_alias) { 'keystore_key_alias' }
9+
let(:signing_key_password) { 'signing_key_password' }
10+
11+
it 'calls `bundletool` with the correct arguments' do
12+
cmd = run_described_fastlane_action(
13+
aab_path: aab_path,
14+
apk_output_path: apk_output_path,
15+
keystore_path: keystore_path,
16+
keystore_password: keystore_password,
17+
keystore_key_alias: keystore_key_alias,
18+
signing_key_password: signing_key_password
19+
)
20+
expect(cmd).to eq("bundletool build-apks --mode universal --bundle #{aab_path} --output-format DIRECTORY --output #{apk_output_path} --ks #{keystore_path} --ks-pass #{keystore_password} --ks-key-alias #{keystore_key_alias} --key-pass #{signing_key_password}")
21+
end
22+
end

0 commit comments

Comments
 (0)