aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/fake.unit.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/fake.unit.js b/test/fake.unit.js
index e541d938..6a802ec4 100644
--- a/test/fake.unit.js
+++ b/test/fake.unit.js
@@ -27,5 +27,25 @@ describe("fake.js", function () {
var random = faker.fake('{{helpers.randomize(["one", "two", "three"])}}');
assert.ok(arr.indexOf(random) > -1);
});
+
+ it("does not allow undefined parameters", function () {
+ assert.throws(function () {
+ faker.fake()
+ }, Error);
+ });
+
+ it("does not allow invalid module name", function () {
+ assert.throws(function () {
+ faker.fake('{{foo.bar}}')
+ }, Error);
+ });
+
+ it("does not allow invalid method name", function () {
+ assert.throws(function () {
+ faker.fake('{{address.foo}}')
+ }, Error);
+ });
+
+
});
});