mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Fixed regression tests for roles and migrations
no-issue These tests were missed when adding the DB Backup Integration.
This commit is contained in:
parent
75ba8b5c64
commit
1fd73e092f
2 changed files with 7 additions and 5 deletions
|
@ -40,13 +40,14 @@ describe('Roles API', function () {
|
|||
should.exist(response);
|
||||
should.exist(response.roles);
|
||||
localUtils.API.checkResponse(response, 'roles');
|
||||
response.roles.should.have.length(6);
|
||||
response.roles.should.have.length(7);
|
||||
localUtils.API.checkResponse(response.roles[0], 'role');
|
||||
localUtils.API.checkResponse(response.roles[1], 'role');
|
||||
localUtils.API.checkResponse(response.roles[2], 'role');
|
||||
localUtils.API.checkResponse(response.roles[3], 'role');
|
||||
localUtils.API.checkResponse(response.roles[4], 'role');
|
||||
localUtils.API.checkResponse(response.roles[5], 'role');
|
||||
localUtils.API.checkResponse(response.roles[6], 'role');
|
||||
|
||||
done();
|
||||
});
|
||||
|
|
|
@ -35,11 +35,11 @@ describe('Database Migration (special functions)', function () {
|
|||
|
||||
// DB
|
||||
permissions[0].name.should.eql('Export database');
|
||||
permissions[0].should.be.AssignedToRoles(['Administrator']);
|
||||
permissions[0].should.be.AssignedToRoles(['Administrator', 'DB Backup Integration']);
|
||||
permissions[1].name.should.eql('Import database');
|
||||
permissions[1].should.be.AssignedToRoles(['Administrator']);
|
||||
permissions[1].should.be.AssignedToRoles(['Administrator', 'DB Backup Integration']);
|
||||
permissions[2].name.should.eql('Delete all content');
|
||||
permissions[2].should.be.AssignedToRoles(['Administrator']);
|
||||
permissions[2].should.be.AssignedToRoles(['Administrator', 'DB Backup Integration']);
|
||||
|
||||
// Mail
|
||||
permissions[3].name.should.eql('Send mail');
|
||||
|
@ -260,13 +260,14 @@ describe('Database Migration (special functions)', function () {
|
|||
|
||||
// Roles
|
||||
should.exist(result.roles);
|
||||
result.roles.length.should.eql(6);
|
||||
result.roles.length.should.eql(7);
|
||||
result.roles.at(0).get('name').should.eql('Administrator');
|
||||
result.roles.at(1).get('name').should.eql('Editor');
|
||||
result.roles.at(2).get('name').should.eql('Author');
|
||||
result.roles.at(3).get('name').should.eql('Contributor');
|
||||
result.roles.at(4).get('name').should.eql('Owner');
|
||||
result.roles.at(5).get('name').should.eql('Admin Integration');
|
||||
result.roles.at(6).get('name').should.eql('DB Backup Integration');
|
||||
|
||||
// Permissions
|
||||
result.permissions.length.should.eql(70);
|
||||
|
|
Loading…
Add table
Reference in a new issue