mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-21 14:30:59 +08:00
Introduce pluggable email and image upload
This commit is contained in:
14
src/test/java/com/openisle/service/CosImageUploaderTest.java
Normal file
14
src/test/java/com/openisle/service/CosImageUploaderTest.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.openisle.service;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class CosImageUploaderTest {
|
||||
@Test
|
||||
void uploadReturnsUrl() {
|
||||
CosImageUploader uploader = new CosImageUploader("http://cos.example.com");
|
||||
String url = uploader.upload("data".getBytes(), "img.png");
|
||||
assertEquals("http://cos.example.com/img.png", url);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user