Skip to content

Commit 4dbb757

Browse files
committed
added location test
1 parent 46074cb commit 4dbb757

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
const { expect } = require('chai')
2+
const db = require('../../index')
3+
const Location = db.model('location')
4+
5+
describe('Location model', () => {
6+
beforeEach(() => {
7+
return db.sync({force: true})
8+
})
9+
10+
describe('Model', () => {
11+
describe('url', () => {
12+
let page;
13+
const url = 'https://www.youtube.com/watch?v=BMUiFMZr7vk'
14+
15+
beforeEach(() => {
16+
return Location.create({url})
17+
18+
.then(location => {
19+
page = location
20+
})
21+
})
22+
23+
it('tests model type', () => {
24+
expect(page.url).to.be.equal('https://www.youtube.com/watch?v=BMUiFMZr7vk')
25+
})
26+
})
27+
})
28+
})

0 commit comments

Comments
 (0)