File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ await cut.InvokeAsync(() => input.Instance.OnChange.InvokeAsync(new InputFileCha
8383 {
8484 pb . Add ( a => a . IsDisabled , true ) ;
8585 } ) ;
86- cut . DoesNotContain ( "upload-item-actions" ) ;
86+ cut . Contains ( "upload-item-actions" ) ;
8787
8888 // IsUploadButtonAtFirst
8989 cut . SetParametersAndRender ( pb =>
@@ -184,6 +184,19 @@ await cut.InvokeAsync(() =>
184184 } ) ;
185185 }
186186
187+ [ Fact ]
188+ public void IsImage_Ok ( )
189+ {
190+ var file = new UploadFile
191+ {
192+ File = new MockBrowserFile ( "test.text" )
193+ } ;
194+ Assert . True ( file . IsImage ( [ ".text" ] ) ) ;
195+
196+ file . File = new MockBrowserFile ( "test.jpg" , "image/jpeg" ) ;
197+ Assert . True ( file . IsImage ( ) ) ;
198+ }
199+
187200 private class MockBrowserFile ( string name = "UploadTestFile" , string contentType = "text" ) : IBrowserFile
188201 {
189202 public string Name { get ; } = name ;
You can’t perform that action at this time.
0 commit comments