fix unit tests

This commit is contained in:
Clément DOUIN 2023-05-01 00:44:59 +02:00
parent 5d00e0bef0
commit 9453f83c94
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72
4 changed files with 6 additions and 3 deletions

View file

@ -20,5 +20,5 @@ jobs:
with: with:
name: soywod name: soywod
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Test - name: Build then test
run: nix run .#test run: nix build

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Fixed Windows releases (due to typo in the github action script). - Fixed Windows releases (due to typo in the github action script).
- Fixed unit tests.
## [0.7.2] - 2023-05-01 ## [0.7.2] - 2023-05-01

View file

@ -75,6 +75,8 @@
cp assets/himalaya.desktop $out/share/applications/ cp assets/himalaya.desktop $out/share/applications/
''; '';
}; };
doCheck = true;
cargoTestOptions = opts: opts ++ [ "--lib" ];
} // pkgs.lib.optionalAttrs (!isNull targetPlatform) { } // pkgs.lib.optionalAttrs (!isNull targetPlatform) {
CARGO_BUILD_TARGET = targetPlatform; CARGO_BUILD_TARGET = targetPlatform;
} // package; } // package;

View file

@ -257,7 +257,7 @@ mod tests {
let mut printer = PrinterServiceTest::default(); let mut printer = PrinterServiceTest::default();
let mut backend = TestBackend {}; let mut backend = TestBackend {};
assert!(list(None, &account_config, &mut printer, &mut backend).is_ok()); assert!(list(&account_config, &mut printer, &mut backend, None).is_ok());
assert_eq!( assert_eq!(
concat![ concat![
"\n", "\n",