1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-05 01:19:46 +01:00
home-manager/tests/modules/programs/granted/integration-enabled.nix

27 lines
540 B
Nix
Raw Normal View History

{ pkgs, ... }:
{
programs = {
granted.enable = true;
zsh.enable = true;
};
test.stubs.granted = { };
nmt.script = ''
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
'function assume()'
assertFileContains \
home-files/.zshrc \
'export GRANTED_ALIAS_CONFIGURED="true"'
assertFileContains \
home-files/.zshrc \
'source @granted@/bin/assume "$@"'
assertFileContains \
home-files/.zshrc \
'unset GRANTED_ALIAS_CONFIGURED'
'';
}