2016-07-27 05:44:07 +02:00
|
|
|
describe '/system/init-settings' do
|
|
|
|
it 'should initialize correctly' do
|
2017-03-15 20:17:06 +01:00
|
|
|
result = request('/system/init-settings', {
|
|
|
|
'user-system-enabled' => true,
|
|
|
|
'registration' => true,
|
|
|
|
'language' => 'en'
|
|
|
|
})
|
2016-07-27 05:44:07 +02:00
|
|
|
|
|
|
|
lang = $database.getRow('setting', 'language', 'name')
|
|
|
|
|
|
|
|
(result['status']).should.equal('success')
|
|
|
|
(lang['value']).should.equal('en')
|
2017-03-15 20:17:06 +01:00
|
|
|
|
|
|
|
result = request('/system/init-admin', {
|
|
|
|
name: 'Emilia Clarke',
|
|
|
|
email: $staff[:email],
|
|
|
|
password: $staff[:password]
|
|
|
|
})
|
|
|
|
|
|
|
|
(result['status']).should.equal('success')
|
2016-07-27 05:44:07 +02:00
|
|
|
end
|
|
|
|
end
|