mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-18 21:10:57 +08:00
fix: test cases
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package com.openisle.integration;
|
||||
|
||||
import com.openisle.controller.ActivityController;
|
||||
import com.openisle.model.User;
|
||||
import com.openisle.model.Role;
|
||||
import com.openisle.repository.UserRepository;
|
||||
import com.openisle.service.AvatarGenerator;
|
||||
import com.openisle.service.EmailSender;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.openisle.model.Role;
|
||||
import com.openisle.model.User;
|
||||
import com.openisle.repository.UserRepository;
|
||||
import com.openisle.service.EmailSender;
|
||||
import com.openisle.service.PushNotificationService;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@@ -61,10 +61,10 @@ class SearchIntegrationTest {
|
||||
String admin = registerAndLoginAsAdmin("admin1", "a@a.com");
|
||||
String user = registerAndLogin("bob_nice", "b@b.com");
|
||||
|
||||
ResponseEntity<Map> catResp = postJson("/api/categories", Map.of("name", "nic-cat", "description", "d", "icon", "i"), admin);
|
||||
ResponseEntity<Map> catResp = postJson("/api/categories", Map.of("name", "niccat", "description", "d", "icon", "i"), admin);
|
||||
Long catId = ((Number)catResp.getBody().get("id")).longValue();
|
||||
|
||||
ResponseEntity<Map> tagResp = postJson("/api/tags", Map.of("name", "nic-tag", "description", "d", "icon", "i"), admin);
|
||||
ResponseEntity<Map> tagResp = postJson("/api/tags", Map.of("name", "nictag", "description", "d", "icon", "i"), admin);
|
||||
Long tagId = ((Number)tagResp.getBody().get("id")).longValue();
|
||||
|
||||
ResponseEntity<Map> postResp = postJson("/api/posts",
|
||||
|
||||
@@ -25,3 +25,12 @@ app.post.publish-mode=DIRECT
|
||||
|
||||
# Base website URL used in tests
|
||||
app.website-url=http://localhost
|
||||
|
||||
# Default avatar generator configuration
|
||||
app.avatar.style=${AVATAR_STYLE:pixel-art-neutral}
|
||||
app.avatar.size=${AVATAR_SIZE:128}
|
||||
app.avatar.base-url=${AVATAR_BASE_URL:https://api.dicebear.com/6.x}
|
||||
|
||||
# Web push configuration
|
||||
app.webpush.public-key=${WEBPUSH_PUBLIC_KEY:}
|
||||
app.webpush.private-key=${WEBPUSH_PRIVATE_KEY:}
|
||||
|
||||
Reference in New Issue
Block a user