1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-14 15:19:45 +01:00
home-manager/tests/modules/programs/lieer/lieer.nix
Robert Helgesson 95b95b1407
tests: improve test purity
Before the XDG variables would be set from the user's environment, if
available. This would break some tests.

With this change the tests should be fully deterministic.

Fixes #1190
2020-04-24 21:46:34 +02:00

23 lines
560 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
imports = [ ../../accounts/email-test-accounts.nix ];
config = {
programs.lieer.enable = true;
accounts.email.accounts = { "hm@example.com".lieer.enable = true; };
nixpkgs.overlays = [
(self: super: { gmailieer = pkgs.writeScriptBin "dummy-gmailieer" ""; })
];
nmt.script = ''
assertFileExists home-files/Mail/hm@example.com/.gmailieer.json
assertFileContent home-files/Mail/hm@example.com/.gmailieer.json \
${./lieer-expected.json}
'';
};
}