mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 09:03:02 +00:00
refactor: throw an error when removing a non-existing plugin
Related to #2
This commit is contained in:
committed by
Rainer Killinger
parent
992a0a6f2c
commit
3ea2c3b98d
@@ -102,7 +102,7 @@ export class AppPluginRegisterSpec {
|
||||
}
|
||||
|
||||
@test
|
||||
async 'should response with false when deleting non previously registered plugin'() {
|
||||
async 'should response with 404 when deleting non previously registered plugin'() {
|
||||
// lets simulate that the plugin is already registered
|
||||
plugins.set(registerAddRequest.plugin.route, registerAddRequest.plugin);
|
||||
|
||||
@@ -112,7 +112,7 @@ export class AppPluginRegisterSpec {
|
||||
.set('Accept', 'application/json')
|
||||
// using a different route for the remove request
|
||||
.send({action: 'remove', route: '/not-foo'} as SCPluginRemove)
|
||||
.expect(200, {success: false});
|
||||
.expect(404);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user