aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/services/lieer/lieer-service.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/tests/modules/services/lieer/lieer-service.nix')
-rw-r--r--home-manager/tests/modules/services/lieer/lieer-service.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/home-manager/tests/modules/services/lieer/lieer-service.nix b/home-manager/tests/modules/services/lieer/lieer-service.nix
new file mode 100644
index 00000000000..03dcdc749b1
--- /dev/null
+++ b/home-manager/tests/modules/services/lieer/lieer-service.nix
@@ -0,0 +1,34 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+ imports = [ ../../accounts/email-test-accounts.nix ];
+
+ config = {
+ services.lieer.enable = true;
+
+ accounts.email.accounts = {
+ "hm@example.com".lieer.enable = true;
+ "hm@example.com".lieer.sync.enable = true;
+ };
+
+ nixpkgs.overlays = [
+ (self: super: {
+ gmailieer = pkgs.writeScriptBin "dummy-gmailieer" "" // {
+ outPath = "@lieer@";
+ };
+ })
+ ];
+
+ nmt.script = ''
+ assertFileExists home-files/.config/systemd/user/lieer-hm-example-com.service
+ assertFileExists home-files/.config/systemd/user/lieer-hm-example-com.timer
+
+ assertFileContent home-files/.config/systemd/user/lieer-hm-example-com.service \
+ ${./lieer-service-expected.service}
+ assertFileContent home-files/.config/systemd/user/lieer-hm-example-com.timer \
+ ${./lieer-service-expected.timer}
+ '';
+ };
+}