1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-03 05:23:32 +02:00
home-manager/tests/modules/programs/goimapnotify/launchd.nix
Robert Helgesson f288310b7a
goimapnotify: remove test dependency on notmuch
Also minor test cleanup.
2023-07-08 09:58:06 +02:00

41 lines
827 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
imports = [ ../../accounts/email-test-accounts.nix ];
accounts.email.accounts = {
"hm@example.com" = {
notmuch.enable = true;
imap.port = 993;
imapnotify = {
enable = true;
boxes = [ "Inbox" ];
onNotify = ''
${pkgs.notmuch}/bin/notmuch new
'';
};
};
};
services.imapnotify = {
enable = true;
package = (config.lib.test.mkStubPackage {
name = "goimapnotify";
outPath = "@goimapnotify@";
});
};
test.stubs.notmuch = { };
nmt.script = let
serviceFileName = "org.nix-community.home.imapnotify-hm-example.com.plist";
in ''
serviceFile=LaunchAgents/${serviceFileName}
assertFileExists $serviceFile
assertFileContent $serviceFile ${./launchd.plist}
'';
}