Skip to content

Commit

Permalink
fix auth test
Browse files Browse the repository at this point in the history
  • Loading branch information
mucsi96 committed Oct 16, 2023
1 parent 3dcf0b0 commit a955aa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@ public class BaseIntegrationTest {

WebDriverWait wait;

public void setupMocksWithNoAuth() {
public void setupMocks() {
wait = new WebDriverWait(webDriver, Duration.ofSeconds(5));
cleanupDB();
}

public void setupMocks() {
setupMocksWithNoAuth();
jdbcTemplate.execute("INSERT INTO oauth2_authorized_client (" + //
"client_registration_id," + //
"principal_name," + //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public class WithingsTest extends BaseIntegrationTest {

@Test
void authorizes_withings() {
setupMocksWithNoAuth();
setupMocks();
jdbcTemplate.execute("DELETE FROM oauth2_authorized_client WHERE client_registration_id = 'withings-client';");
webDriver.get(baseUrl);
wait.until(ExpectedConditions
.visibilityOfElementLocated(By.xpath("//h1[contains(text(), \"Mock Withings\")]")));
Expand Down

0 comments on commit a955aa1

Please sign in to comment.