Browse Source

Add test case for Escaped JSON Issue #276

Maurits van der Schee 7 years ago
parent
commit
a534923d90
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      tests/Tests.php

+ 9
- 0
tests/Tests.php View File

@@ -634,4 +634,13 @@ abstract class Tests extends TestBase
634 634
         $test->get('/barcodes?transform=1');
635 635
         $test->expect('{"barcodes":[{"id":1,"product_id":1,"hex":"00ff01","bin":"AP8B"}]}');
636 636
     }
637
+    
638
+    public function testEditPostWithApostrophe()
639
+    {
640
+        $test = new Api($this);
641
+        $test->put('/posts/1', '[{"id":1,"user_id":1,"category_id":1,"content":"blog start\'d"}]');
642
+        $test->expect('1');
643
+        $test->get('/posts/1');
644
+        $test->expect('{"id":1,"user_id":1,"category_id":1,"content":"blog start\'d"}');
645
+    }
637 646
 }

Loading…
Cancel
Save