Skip to content

Commit

Permalink
adding tests for raw-text variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Apr 12, 2015
1 parent 8702899 commit ebf202a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/formatSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,17 @@ describe("Method as.text", function () {
it("must correctly convert any text", function () {

expect(pgp.as.text()).toBe("null");

expect(function(){
pgp.as.text(undefined, true);
}).toThrow(errors.raw());

expect(pgp.as.text(null)).toBe("null");

expect(function(){
pgp.as.text(null, true);
}).toThrow(errors.raw());

expect(pgp.as.text("")).toBe("''");
expect(pgp.as.text("", true)).toBe(""); // raw-text test;

Expand Down

0 comments on commit ebf202a

Please sign in to comment.