diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d346b05..f04397b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,5 +20,5 @@ jobs: with: name: soywod authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - name: Test - run: nix run .#test + - name: Build then test + run: nix build diff --git a/CHANGELOG.md b/CHANGELOG.md index 9be13f2..0707371 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed Windows releases (due to typo in the github action script). +- Fixed unit tests. ## [0.7.2] - 2023-05-01 diff --git a/flake.nix b/flake.nix index 34bc322..eca6957 100644 --- a/flake.nix +++ b/flake.nix @@ -75,6 +75,8 @@ cp assets/himalaya.desktop $out/share/applications/ ''; }; + doCheck = true; + cargoTestOptions = opts: opts ++ [ "--lib" ]; } // pkgs.lib.optionalAttrs (!isNull targetPlatform) { CARGO_BUILD_TARGET = targetPlatform; } // package; diff --git a/src/domain/folder/handlers.rs b/src/domain/folder/handlers.rs index 2e2a384..b433ddc 100644 --- a/src/domain/folder/handlers.rs +++ b/src/domain/folder/handlers.rs @@ -257,7 +257,7 @@ mod tests { let mut printer = PrinterServiceTest::default(); 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!( concat![ "\n",