Skip to content

Commit

Permalink
chore(test/index.js) filter method tested
Browse files Browse the repository at this point in the history
  • Loading branch information
rimiti committed Aug 1, 2017
1 parent d882a18 commit b225252
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
4 changes: 0 additions & 4 deletions src/class/sdk.js
Expand Up @@ -2,8 +2,4 @@ import Base from './base'

export default class SDK extends Base {

constructor() {
super()
}

}
File renamed without changes.
14 changes: 0 additions & 14 deletions src/utils/filters.js

This file was deleted.

7 changes: 5 additions & 2 deletions test/index.js
@@ -1,5 +1,8 @@
import test from 'ava'
import sdk from '../src/lib'

test(`Don't throw exception`, t => {
t.is(true, true)
test('Generate filters', t => {
const api = sdk.create()
const filters = api.filter({deleted: false, taker: 'ClicRDV', updated_at: '>2015-10-29 10:00:00'})
t.is(filters, `conditions%5B0%5D%5Bfield%5D=deleted&conditions%5B0%5D%5Bop%5D=%3D&conditions%5B0%5D%5Bvalue%5D=false&conditions%5B1%5D%5Bfield%5D=taker&conditions%5B1%5D%5Bop%5D=%3D&conditions%5B1%5D%5Bvalue%5D=ClicRDV&conditions%5B2%5D%5Bfield%5D=updated_at&conditions%5B2%5D%5Bop%5D=%3E&conditions%5B2%5D%5Bvalue%5D=2015-10-29%2010%3A00%3A00`)
})

0 comments on commit b225252

Please sign in to comment.