mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 03:29:45 +01:00
notmuch: add basic test case
This commit is contained in:
parent
95c8007b8f
commit
4893d1b4d4
4 changed files with 56 additions and 0 deletions
|
@ -46,6 +46,7 @@ import nmt {
|
|||
// import ./modules/programs/git
|
||||
// import ./modules/programs/gpg
|
||||
// import ./modules/programs/newsboat
|
||||
// import ./modules/programs/notmuch
|
||||
// import ./modules/programs/readline
|
||||
// import ./modules/programs/ssh
|
||||
// import ./modules/programs/tmux
|
||||
|
|
19
tests/modules/programs/notmuch/basic-config-expected.conf
Normal file
19
tests/modules/programs/notmuch/basic-config-expected.conf
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Generated by Home Manager.
|
||||
|
||||
[database]
|
||||
path=/home/hm-user/Mail
|
||||
|
||||
[maildir]
|
||||
synchronize_flags=true
|
||||
|
||||
[new]
|
||||
ignore=
|
||||
tags=unread;inbox
|
||||
|
||||
[search]
|
||||
exclude_tags=deleted;spam
|
||||
|
||||
[user]
|
||||
name=H. M. Test
|
||||
other_email=;hm@example.org;
|
||||
primary_email=hm@example.com
|
33
tests/modules/programs/notmuch/basic-config.nix
Normal file
33
tests/modules/programs/notmuch/basic-config.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||
|
||||
config = {
|
||||
home.username = "hm-user";
|
||||
home.homeDirectory = "/home/hm-user";
|
||||
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
accounts.email.accounts = {
|
||||
"hm@example.com" = {
|
||||
notmuch.enable = true;
|
||||
primary = true;
|
||||
};
|
||||
|
||||
hm-account.notmuch = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/notmuch/notmuchrc
|
||||
assertFileContent home-files/.config/notmuch/notmuchrc \
|
||||
${./basic-config-expected.conf}
|
||||
'';
|
||||
};
|
||||
}
|
3
tests/modules/programs/notmuch/default.nix
Normal file
3
tests/modules/programs/notmuch/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
notmuch-basic-config = ./basic-config.nix;
|
||||
}
|
Loading…
Reference in a new issue