1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-10 18:57:22 +00:00
home-manager/tests/modules/programs/gh/warnings.nix

33 lines
845 B
Nix
Raw Normal View History

{ options, lib, ... }:
2021-10-08 23:29:25 +02:00
{
programs.gh = {
enable = true;
aliases = { co = "pr checkout"; };
editor = "vim";
};
2021-10-08 23:29:25 +02:00
test.asserts.warnings.expected = [
"The option `programs.gh.editor' defined in ${
lib.showFiles options.programs.gh.editor.files
} has been renamed to `programs.gh.settings.editor'."
"The option `programs.gh.aliases' defined in ${
lib.showFiles options.programs.gh.aliases.files
} has been renamed to `programs.gh.settings.aliases'."
];
test.asserts.warnings.enable = true;
2021-10-08 23:29:25 +02:00
nmt.script = ''
assertFileExists home-files/.config/gh/config.yml
assertFileContent home-files/.config/gh/config.yml ${
builtins.toFile "config-file.yml" ''
aliases:
co: pr checkout
editor: vim
git_protocol: https
version: '1'
''
}
'';
2021-10-08 23:29:25 +02:00
}