update rudy test
This commit is contained in:
parent
9f84239c3e
commit
e64e8e65f1
|
@ -18,7 +18,7 @@ describe '/ticket/search' do
|
|||
csrf_userid: $csrf_userid,
|
||||
csrf_token: $csrf_token,
|
||||
page: 1,
|
||||
tags: [1,11,111,1111,11111,111111,1111111,11111111]
|
||||
tags: "[1,11,111,1111,11111,111111,1111111,11111111]"
|
||||
})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INVALID_TAG_FILTER')
|
||||
|
@ -51,7 +51,18 @@ describe '/ticket/search' do
|
|||
csrf_userid: $csrf_userid,
|
||||
csrf_token: $csrf_token,
|
||||
page: 1,
|
||||
priority: [0,1,5,6]
|
||||
priority: "[0,1,5,6]"
|
||||
})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INVALID_PRIORITY_FILTER')
|
||||
end
|
||||
|
||||
it 'should fail if the priority' do
|
||||
result = request('/ticket/search', {
|
||||
csrf_userid: $csrf_userid,
|
||||
csrf_token: $csrf_token,
|
||||
page: 1,
|
||||
priority: "[0,1,),hi]"
|
||||
})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INVALID_PRIORITY_FILTER')
|
||||
|
@ -62,7 +73,7 @@ describe '/ticket/search' do
|
|||
csrf_userid: $csrf_userid,
|
||||
csrf_token: $csrf_token,
|
||||
page: 1,
|
||||
dateRange: [11,69,11]
|
||||
dateRange: "[11,69,()) ]"
|
||||
})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INVALID_DATE_RANGE_FILTER')
|
||||
|
@ -73,7 +84,7 @@ describe '/ticket/search' do
|
|||
csrf_userid: $csrf_userid,
|
||||
csrf_token: $csrf_token,
|
||||
page: 1,
|
||||
departments: [-1,-2,99]
|
||||
departments: "[-1,-2,99]"
|
||||
})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INVALID_DEPARTMENT_FILTER')
|
||||
|
@ -84,7 +95,16 @@ describe '/ticket/search' do
|
|||
csrf_userid: $csrf_userid,
|
||||
csrf_token: $csrf_token,
|
||||
page: 1,
|
||||
authors: [{id:30001, staff: 1},{id:30,staff: 3}]
|
||||
authors: "[{id:30001, staff: 1},{id:30,staff: 3}]"
|
||||
})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INVALID_AUTHOR_FILTER')
|
||||
|
||||
result = request('/ticket/search', {
|
||||
csrf_userid: $csrf_userid,
|
||||
csrf_token: $csrf_token,
|
||||
page: 1,
|
||||
authors: "[{id:'delete all)', staff: 1},{id:30,staff: 3}]"
|
||||
})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INVALID_AUTHOR_FILTER')
|
||||
|
@ -101,12 +121,23 @@ describe '/ticket/search' do
|
|||
(result['message']).should.equal('INVALID_ASSIGNED_FILTER')
|
||||
end
|
||||
|
||||
it 'should fail if the assigned value is invalid' do
|
||||
result = request('/ticket/search', {
|
||||
csrf_userid: $csrf_userid,
|
||||
csrf_token: $csrf_token,
|
||||
page: 1,
|
||||
query: 'dasjfawj!!!)())'
|
||||
})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INVALID_ASSIGNED_FILTER')
|
||||
end
|
||||
|
||||
it 'should fail if the orderBy values are invalid' do
|
||||
result = request('/ticket/search', {
|
||||
csrf_userid: $csrf_userid,
|
||||
csrf_token: $csrf_token,
|
||||
page: 1,
|
||||
orderBy: [{value: 'closeddd', asc: 11}]
|
||||
orderBy: "{value: 'closeddd', asc: 11}"
|
||||
})
|
||||
(result['status']).should.equal('fail')
|
||||
(result['message']).should.equal('INVALID_ORDER_BY')
|
||||
|
|
Loading…
Reference in New Issue