aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mason-core/managers/cargo_spec.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2023-05-18 17:06:38 +0200
committerGitHub <noreply@github.com>2023-05-18 17:06:38 +0200
commit227f8a9aaae495f481c768f8346edfceaf6d2951 (patch)
tree8b2dad3c6175fac3c02489690304f759f21b3649 /tests/mason-core/managers/cargo_spec.lua
parentfix(ui): use vim.cmd("") for nvim-0.7.0 compatibility (#1307) (diff)
downloadmason-227f8a9aaae495f481c768f8346edfceaf6d2951.tar
mason-227f8a9aaae495f481c768f8346edfceaf6d2951.tar.gz
mason-227f8a9aaae495f481c768f8346edfceaf6d2951.tar.bz2
mason-227f8a9aaae495f481c768f8346edfceaf6d2951.tar.lz
mason-227f8a9aaae495f481c768f8346edfceaf6d2951.tar.xz
mason-227f8a9aaae495f481c768f8346edfceaf6d2951.tar.zst
mason-227f8a9aaae495f481c768f8346edfceaf6d2951.zip
feat(installer): lock package installation (#1290)
Diffstat (limited to 'tests/mason-core/managers/cargo_spec.lua')
-rw-r--r--tests/mason-core/managers/cargo_spec.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/mason-core/managers/cargo_spec.lua b/tests/mason-core/managers/cargo_spec.lua
index 9f43d517..92d04588 100644
--- a/tests/mason-core/managers/cargo_spec.lua
+++ b/tests/mason-core/managers/cargo_spec.lua
@@ -18,7 +18,7 @@ describe("cargo manager", function()
async_test(function()
local handle = InstallHandleGenerator "dummy"
local ctx = InstallContextGenerator(handle, { version = "42.13.37" })
- installer.prepare_installer(ctx)
+ installer.prepare_installer(ctx):get_or_throw()
installer.exec_in_context(ctx, cargo.crate "my-crate")
assert.spy(ctx.spawn.cargo).was_called(1)
assert.spy(ctx.spawn.cargo).was_called_with {
@@ -39,7 +39,7 @@ describe("cargo manager", function()
async_test(function()
local handle = InstallHandleGenerator "dummy"
local ctx = InstallContextGenerator(handle)
- installer.prepare_installer(ctx)
+ installer.prepare_installer(ctx):get_or_throw()
installer.exec_in_context(ctx, cargo.crate("my-crate", { git = { url = "https://my-crate.git" } }))
assert.spy(ctx.spawn.cargo).was_called(1)
assert.spy(ctx.spawn.cargo).was_called_with {
@@ -60,7 +60,7 @@ describe("cargo manager", function()
async_test(function()
local handle = InstallHandleGenerator "dummy"
local ctx = InstallContextGenerator(handle)
- installer.prepare_installer(ctx)
+ installer.prepare_installer(ctx):get_or_throw()
installer.exec_in_context(ctx, cargo.crate("crate-name", { git = { url = "https://my-crate.git" } }))
assert.spy(ctx.spawn.cargo).was_called(1)
assert.spy(ctx.spawn.cargo).was_called_with {
@@ -81,7 +81,7 @@ describe("cargo manager", function()
async_test(function()
local handle = InstallHandleGenerator "dummy"
local ctx = InstallContextGenerator(handle, { version = "42.13.37" })
- installer.prepare_installer(ctx)
+ installer.prepare_installer(ctx):get_or_throw()
installer.exec_in_context(ctx, cargo.crate("my-crate", { features = "lsp" }))
assert.spy(ctx.spawn.cargo).was_called(1)
assert.spy(ctx.spawn.cargo).was_called_with {
@@ -104,7 +104,7 @@ describe("cargo manager", function()
stub(github, "tag")
github.tag.returns { tag = "v2.1.1", with_receipt = mockx.just_runs }
local ctx = InstallContextGenerator(handle, { version = "42.13.37" })
- installer.prepare_installer(ctx)
+ installer.prepare_installer(ctx):get_or_throw()
installer.exec_in_context(
ctx,
cargo.crate("my-crate", {
@@ -133,7 +133,7 @@ describe("cargo manager", function()
async_test(function()
local handle = InstallHandleGenerator "dummy"
local ctx = InstallContextGenerator(handle)
- installer.prepare_installer(ctx)
+ installer.prepare_installer(ctx):get_or_throw()
installer.exec_in_context(ctx, cargo.crate "main-package")
assert.same({
type = "cargo",