We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dbb757 commit e100d21Copy full SHA for e100d21
server/db/models/location/location.spec.js
@@ -25,4 +25,23 @@ describe('Location model', () => {
25
})
26
27
28
+
29
+ describe('location url type validation', () => {
30
+ let url
31
32
+ beforeEach(() => {
33
+ url = Location.build({
34
+ url: 'test'
35
+ })
36
37
38
+ it('throw an validation error when location is not an url', () => {
39
+ return url.validate()
40
+ .then(() => {
41
+ throw new Error('validation should fail when content is less than 10 words')
42
+ }, (result) => {
43
+ expect(result).to.be.an.instanceOf(Error);
44
45
46
47
0 commit comments