2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01: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:
Fabien O'Carroll 2019-08-05 10:57:47 +08:00
parent 75ba8b5c64
commit 1fd73e092f
2 changed files with 7 additions and 5 deletions

View file

@ -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();
});

View file

@ -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);