Commits

dcutting  committed 0016aff

Edge cases for HTTP URL types.

  • Participants
  • Parent commits bb7cad0

Comments (0)

Files changed (1)

File VeriJSONTests/VeriJSONTests.m

             BOOL valid = [veriJSON verifyJSON:json pattern:pattern];
             [[@(valid) should] beYes];
         });
+        
+        it(@"relative URL", ^{
+            id json = [bundle jsonFromResource:@"ObjectWithURLRelative.json"];
+            BOOL valid = [veriJSON verifyJSON:json pattern:pattern];
+            [[@(valid) should] beNo];
+        });
 
         it(@"non-HTTP URL", ^{
             id json = [bundle jsonFromResource:@"ObjectWithURL.json"];
             BOOL valid = [veriJSON verifyJSON:json pattern:pattern];
             [[@(valid) should] beNo];
         });
+        
+        it(@"whitespace URL", ^{
+            id json = [bundle jsonFromResource:@"ObjectWithURLInvalidWhitespace.json"];
+            BOOL valid = [veriJSON verifyJSON:json pattern:pattern];
+            [[@(valid) should] beNo];
+        });
     });
     
     it(@"hack to ensure tests finish", ^{