diff --git a/src/GraphQL/Queries/GetBeamQuery.php b/src/GraphQL/Queries/GetBeamQuery.php index 36e1cd7..ea3bb37 100644 --- a/src/GraphQL/Queries/GetBeamQuery.php +++ b/src/GraphQL/Queries/GetBeamQuery.php @@ -85,8 +85,7 @@ protected function rules(array $args = []): array 'bail', 'filled', 'max:1024', - $singleUse ? new SingleUseCodeExist() : 'exists:beams,code,deleted_at,NULL', - new CanClaim($singleUse), + $singleUse ? new SingleUseCodeExist() : 'exists:beams,code,deleted_at,NULL' ], 'account' => ['sometimes', 'bail', new ValidSubstrateAccount(), new ScanLimit()], ]; diff --git a/tests/Feature/GraphQL/Queries/GetBeamTest.php b/tests/Feature/GraphQL/Queries/GetBeamTest.php index 3391e86..31a045f 100644 --- a/tests/Feature/GraphQL/Queries/GetBeamTest.php +++ b/tests/Feature/GraphQL/Queries/GetBeamTest.php @@ -111,21 +111,6 @@ public function test_it_will_fail_with_scan_limit(): void $this->assertArraySubset(['account' => ['You have reached the maximum limit to retry.']], $response['error']); } - /** - * Test get beam with no more claims. - */ - public function test_it_will_fail_with_no_more_claims(): void - { - $this->claimAllBeams(resolve(SubstrateProvider::class)->public_key()); - - $response = $this->graphql($this->method, [ - 'code' => $this->beam->code, - 'account' => resolve(SubstrateProvider::class)->public_key(), - ], true); - - $this->assertArraySubset(['code' => ['There are no more claims available.']], $response['error']); - } - /** * Test isclaimable flag with no more claims. */