Skip to content

Commit a613e64

Browse files
verify demo projects aren't cascade deleted
1 parent f4695ea commit a613e64

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

apps/core/test/services/shell_test.exs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,18 @@ defmodule Core.Services.ShellTest do
184184
assert s.id == shell.id
185185
refute refetch(shell)
186186
end
187+
188+
test "it won't cascade demo projects" do
189+
user = insert(:user)
190+
demo = insert(:demo_project, user: user)
191+
shell = insert(:cloud_shell, user: user, pod_name: "plrl-shell-1")
192+
193+
expect(Kazan, :run, 2, fn _ -> {:ok, Shell.Pods.pod("plrl-shell-1", user.email)} end)
194+
{:ok, _} = Shell.delete(user.id)
195+
196+
refute refetch(shell)
197+
assert refetch(demo)
198+
end
187199
end
188200

189201
describe "#udpate_shell/2" do

0 commit comments

Comments
 (0)