Ivan - Backend - Add get-settings tests [skip ci]

This commit is contained in:
ivan 2016-08-20 18:33:47 -03:00
parent 4f5f91994d
commit 10d6eebc69
3 changed files with 14 additions and 0 deletions

View File

@ -10,6 +10,7 @@ require './scripts.rb'
# TESTS
require './system/init-settings.rb'
require './system/get-settings.rb'
require './user/signup.rb'
require './user/login.rb'
require './user/send-recover-password.rb'

View File

@ -1,2 +1,4 @@
./clean_db.sh
./clean_db.sh
./clean_db.sh
bacon init.rb

View File

@ -0,0 +1,11 @@
describe '/system/get-settings' do
it 'should return correct values' do
result = request('/system/get-settings')
(result['status']).should.equal('success')
(result['data']['language']).should.equal('en')
(result['data']['departments'][0]).should.equal('Tech Support')
(result['data']['departments'][1]).should.equal('Suggestions')
(result['data']['departments'][2]).should.equal('Sales and Subscriptions')
end
end