File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
tests/integration/controller Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ class NotesApiControllerTest extends TestCase {
21
21
private $ controller ;
22
22
private $ mapper ;
23
23
private $ userId = 'test ' ;
24
+ private $ fs ;
24
25
25
26
public function setUp () {
26
27
parent ::setUp ();
@@ -33,6 +34,10 @@ public function setUp() {
33
34
$ this ->controller = $ container ->query (
34
35
'OCA\Notes\Controller\NotesApiController '
35
36
);
37
+
38
+ $ this ->fs = $ this ->controller = $ container ->query (
39
+ 'OCP\Files\IRootFolder '
40
+ );
36
41
}
37
42
38
43
@@ -48,6 +53,10 @@ public function testUpdate() {
48
53
49
54
$ this ->assertCount (1 , $ notes );
50
55
$ this ->assertEquals ('test2 ' , $ notes [0 ]->getContent ());
56
+
57
+ $ file = $ this ->fs ->get ('/ ' . $ userId . '/notes/test2.txt ' );
58
+
59
+ $ this ->assertTrue ($ file instanceof OCP \Files \File);
51
60
}
52
61
53
62
You can’t perform that action at this time.
0 commit comments