diff --git a/tests/default.nix b/tests/default.nix index 2eaaaa436..d278be9f7 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -286,6 +286,7 @@ in import nmtSrc { ./modules/services/trayscale ./modules/services/twmn ./modules/services/udiskie + ./modules/services/volnoti ./modules/services/window-managers/bspwm ./modules/services/window-managers/herbstluftwm ./modules/services/window-managers/hyprland diff --git a/tests/modules/services/volnoti/default.nix b/tests/modules/services/volnoti/default.nix new file mode 100644 index 000000000..d4621e62f --- /dev/null +++ b/tests/modules/services/volnoti/default.nix @@ -0,0 +1 @@ +{ volnoti-package-option = ./package-option.nix; } diff --git a/tests/modules/services/volnoti/package-option.nix b/tests/modules/services/volnoti/package-option.nix new file mode 100644 index 000000000..095b71b2a --- /dev/null +++ b/tests/modules/services/volnoti/package-option.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + services.volnoti = { + enable = true; + package = pkgs.writeShellScriptBin "fake-volnoti" '' + true + ''; + }; + + home.stateVersion = "24.05"; + + test.stubs.volnoti = { }; + + nmt.script = '' + serviceFile=home-files/.config/systemd/user/volnoti.service + assertFileExists $serviceFile + + assertFileContains $serviceFile \ + 'ExecStart=${lib.getExe config.services.volnoti.package}' + + assertFileContains $serviceFile \ + 'WantedBy=graphical-session.target' + ''; +}