create([ 'workspace_id' => (int) $tenant->workspace_id, 'tenant_id' => (int) $tenant->getKey(), 'provider' => 'microsoft', ]); $this->actingAs($user) ->get('/admin/provider-connections/create?tenant_id='.(string) $tenant->external_id) ->assertForbidden(); $this->actingAs($user) ->get('/admin/provider-connections/'.$connection->getKey()) ->assertOk(); $this->actingAs($user) ->get('/admin/provider-connections/'.$connection->getKey().'/edit') ->assertForbidden(); });