Skip to content

Commit

Permalink
✅ (org): Try to pass OrganizationResourceTests
Browse files Browse the repository at this point in the history
  • Loading branch information
byte-sized-emi committed Dec 16, 2024
1 parent 1679c72 commit cdc64be
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package app.hopps.org.rest;

import app.hopps.org.jpa.Organization;
import app.hopps.org.jpa.OrganizationRepository;
import app.hopps.org.rest.model.NewOrganizationInput;
import app.hopps.org.rest.model.OrganizationInput;
import app.hopps.org.rest.model.OwnerInput;
import io.quarkus.narayana.jta.QuarkusTransaction;
import io.quarkus.test.common.http.TestHTTPEndpoint;
import io.quarkus.test.junit.QuarkusTest;
import jakarta.inject.Inject;
Expand All @@ -17,10 +17,8 @@

import java.net.MalformedURLException;
import java.net.URI;
import java.util.Collections;

import static io.restassured.RestAssured.given;
import static io.restassured.RestAssured.when;
import static org.hamcrest.Matchers.*;

@QuarkusTest
Expand All @@ -30,6 +28,9 @@ class OrganizationResourceTests {
@Inject
Flyway flyway;

@Inject
OrganizationRepository organizationRepository;

@BeforeEach
public void cleanDatabase() {
flyway.clean();
Expand Down Expand Up @@ -78,6 +79,8 @@ void shouldInvalidateVereinWithoutName() {

@Test
void shouldStartCreatingOrganization() throws MalformedURLException {
organizationRepository.deleteAll();

OrganizationInput organizationInput = new OrganizationInput("Schützenverein", "schuetzenverein",
Organization.TYPE.EINGETRAGENER_VEREIN, URI.create("https://hopps.cloud").toURL(),
URI.create("https://hopps.cloud").toURL(), null);
Expand Down

0 comments on commit cdc64be

Please sign in to comment.