additional stripe changes and Billing info cleanup
This commit is contained in:
@@ -46,6 +46,7 @@ test('createWorkspace inserts owner membership and returns the created workspace
|
||||
workspace_type: 'rescue',
|
||||
billing_email: 'billing@example.com',
|
||||
billing_plan: 'rescue_free',
|
||||
billing_interval: 'monthly',
|
||||
created_at: '2026-04-14T00:00:00.000Z',
|
||||
updated_at: '2026-04-14T00:00:00.000Z',
|
||||
},
|
||||
@@ -59,6 +60,7 @@ test('createWorkspace inserts owner membership and returns the created workspace
|
||||
workspaceType: 'rescue',
|
||||
billingEmail: 'billing@example.com',
|
||||
billingPlan: 'rescue_free',
|
||||
billingInterval: 'monthly',
|
||||
owner: user,
|
||||
});
|
||||
|
||||
@@ -79,6 +81,7 @@ test('updateWorkspace converts an existing household flock to rescue without ins
|
||||
workspace_type: 'rescue',
|
||||
billing_email: 'billing@example.com',
|
||||
billing_plan: 'rescue_free',
|
||||
billing_interval: 'monthly',
|
||||
subscription_status: 'active',
|
||||
rescue_verification_status: 'pending',
|
||||
created_at: '2026-04-14T00:00:00.000Z',
|
||||
@@ -93,6 +96,7 @@ test('updateWorkspace converts an existing household flock to rescue without ins
|
||||
workspaceType: 'rescue',
|
||||
billingEmail: 'billing@example.com',
|
||||
billingPlan: 'rescue_free',
|
||||
billingInterval: 'monthly',
|
||||
});
|
||||
|
||||
assert.equal(workspace?.id, 42);
|
||||
@@ -100,7 +104,7 @@ test('updateWorkspace converts an existing household flock to rescue without ins
|
||||
assert.equal(calls.length, 1);
|
||||
assert.match(calls[0].text, /UPDATE workspaces/);
|
||||
assert.doesNotMatch(calls[0].text, /INSERT INTO workspaces/);
|
||||
assert.deepEqual(calls[0].params, [42, 'Converted Rescue', 'rescue', 'billing@example.com', 'rescue_free']);
|
||||
assert.deepEqual(calls[0].params, [42, 'Converted Rescue', 'rescue', 'billing@example.com', 'rescue_free', 'monthly']);
|
||||
});
|
||||
|
||||
test('deleteWorkspaceIfEmpty blocks deletion when birds are still assigned', async () => {
|
||||
|
||||
Reference in New Issue
Block a user