fix: team permissions, transactions, form sentinels and review polish
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
c4e6173e46
commit
231123f641
@@ -63,12 +63,14 @@ test('update replaces members and uses the product owner for the owner rule', fu
|
||||
|
||||
$this->actingAs($admin)->put(route('products.update', $product), teamPayload([
|
||||
'category_id' => $product->category_id,
|
||||
'members_present' => 1,
|
||||
'members' => [['user_id' => $owner->id, 'role' => 'Founder']],
|
||||
]))->assertSessionHasErrors('members.0.user_id');
|
||||
expect($product->members()->pluck('users.id')->all())->toBe([$a->id]);
|
||||
|
||||
$this->actingAs($admin)->put(route('products.update', $product), teamPayload([
|
||||
'category_id' => $product->category_id,
|
||||
'members_present' => 1,
|
||||
'members' => [['user_id' => $admin->id, 'role' => 'Helper'], ['user_id' => $b->id, 'role' => 'New']],
|
||||
]))->assertRedirect()->assertSessionHasNoErrors();
|
||||
expect($product->members()->pluck('users.id')->all())->toEqualCanonicalizing([$admin->id, $b->id]);
|
||||
|
||||
Reference in New Issue
Block a user