mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2025-06-08 03:36:37 +00:00
Dont prioritze rust-toolchain file over input variable (#45)
This commit is contained in:
parent
6a1db6369e
commit
d8323be6bd
5 changed files with 41 additions and 15 deletions
|
@ -40,6 +40,16 @@ describe('actions-rs/toolchain', () => {
|
|||
'INPUT_TOOLCHAIN': 'nightly',
|
||||
});
|
||||
|
||||
expect(args.name).toBe("nightly")
|
||||
});
|
||||
|
||||
it('uses rust-toolchain file if input does not exist', function () {
|
||||
let rustToolchainFile = tempWriteSync("1.39.0");
|
||||
|
||||
let args = morph(() => {
|
||||
return toolchain_args(rustToolchainFile);
|
||||
}, {});
|
||||
|
||||
expect(args.name).toBe("1.39.0")
|
||||
});
|
||||
|
||||
|
@ -48,9 +58,7 @@ describe('actions-rs/toolchain', () => {
|
|||
|
||||
let args = morph(() => {
|
||||
return toolchain_args(rustToolchainFile);
|
||||
}, {
|
||||
'INPUT_TOOLCHAIN': 'nightly',
|
||||
});
|
||||
}, {});
|
||||
|
||||
expect(args.name).toBe("1.39.0")
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue