Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

stub out filter and validator tests

  • Loading branch information...
commit e841bf782661b27a9d1b1d25c15cea2d68973a1c 1 parent c2d036e
@aaronmccall authored
Showing with 37 additions and 0 deletions.
  1. +19 −0 spec/filters.spec.coffee
  2. +18 −0 spec/validators.spec.coffee
View
19 spec/filters.spec.coffee
@@ -0,0 +1,19 @@
+Posture = require("../lib/posture")
+should = require("should")
+
+describe "Filters", ->
+ it "integer should return integer version of numeric arg or zero"
+
+ it "decimal should return float version of numeric arg or zero"
+
+ it "alpha should return only letters"
+
+ it "alnum should return only letters and numbers"
+
+ it "to_json should return the JSON representation of the value"
+
+ it "trim should remove leading and trailing whitespace"
+
+ it "regex should replace pattern by replacement"
+
+ it "bool should convert value to boolean"
View
18 spec/validators.spec.coffee
@@ -0,0 +1,18 @@
+Posture = require("../lib/posture")
+should = require("should")
+
+describe "Validators", ->
+ it "value not less than lessThan param should throw NotLessThan", (done) ->
+ try
+ Posture.Validators.lessThan(5, 3)
+ catch err
+ err.should.be.an.instanceOf(Posture.Validators.NotLessThan)
+ done()
+
+ it "value not greater than greaterThan param should throw NotGreaterThan"
+
+ it "empty value should throw IsEmpty"
+
+ it "number with too many decimal places should throw Invalid"
+
+ it "value not matching regex pattern should throw Invalid"

0 comments on commit e841bf7

Please sign in to comment.
Something went wrong with that request. Please try again.