Skip to content

Commit

Permalink
Merge pull request #14 from ARCANESOFT/develop
Browse files Browse the repository at this point in the history
Updating the package for Laravel 5.5
  • Loading branch information
arcanedev-maroc authored Sep 7, 2017
2 parents 8d08d50 + 5f81248 commit 5e45122
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ checks:
tools:
external_code_coverage:
timeout: 600
runs: 3
runs: 2
php_code_sniffer:
enabled: true
config:
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: php
sudo: false

php:
- 5.6
- 7.0
- 7.1
- nightly
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"type": "library",
"license": "MIT",
"require": {
"php": ">=5.6.4",
"arcanesoft/auth": "~3.0.0",
"arcanesoft/core": "~2.6.0"
"php": ">=7.0",
"arcanesoft/auth": "~3.1.0",
"arcanesoft/core": "~2.7.0"
},
"require-dev": {
"arcanesoft/foundation": "~2.3.0",
"phpunit/phpcov": "~3.0",
"phpunit/phpunit": "~5.0",
"arcanesoft/foundation": "~2.4.0",
"phpunit/phpcov": "~4.0",
"phpunit/phpunit": "~6.0",
"mockery/mockery": "~0.9.0",
"orchestra/testbench-browser-kit": "~3.4.0"
"orchestra/testbench-browser-kit": "~3.5.0"
},
"autoload": {
"psr-4": {
Expand Down
13 changes: 5 additions & 8 deletions tests/Feature/MediaApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,15 @@ public function it_can_get_all_with_a_location()
]);
}

/**
* @test
*
* @expectedException \Illuminate\Auth\Access\AuthorizationException
* @expectedExceptionMessage [Unauthorized] You are not allowed to perform this action.
* @expectedExceptionCode 403
*/
/** @test */
public function it_must_block_access_on_get_all()
{
$this->beUser();

$this->getJson(route('admin::media.api.get'))->json();
$response = $this->getJson(route('admin::media.api.get'));

$response->assertStatus(403);
$response->assertJsonFragment(['message' => '[Unauthorized] You are not allowed to perform this action.']);
}

/** @test */
Expand Down

0 comments on commit 5e45122

Please sign in to comment.