File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
tests/Feature/ImportExport/Exporters Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ public function testHiddenUsesParentMode()
114
114
115
115
public function testNoMatchingRunAsUser ()
116
116
{
117
+ $ admin_user = User::factory ()->create (['is_administrator ' => true ]);
117
118
DB ::beginTransaction ();
118
119
$ user = User::factory ()->create (['username ' => 'test ' ]);
119
120
$ script = Script::factory ()->create (['title ' => 'test ' , 'run_as_user_id ' => $ user ->id ]);
@@ -124,7 +125,8 @@ public function testNoMatchingRunAsUser()
124
125
$ this ->import ($ payload );
125
126
126
127
$ script = Script::where ('title ' , 'test ' )->firstOrFail ();
127
- $ this ->assertNull ($ script ->run_as_user_id );
128
+ $ this ->assertEquals ($ script ->run_as_user_id , $ admin_user ->id );
129
+ $ admin_user ->delete ();
128
130
}
129
131
130
132
public function testRunAsUserIdNull ()
You can’t perform that action at this time.
0 commit comments