Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
  • Loading branch information
Galactus22625 committed Nov 7, 2024
1 parent c3c3328 commit b9c935a
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 @@ -33,6 +33,7 @@ void testGetObjectOauth2() {

@Test
void testGetObjectBasicAuth() {
when(sourceConfig.getAccountUrl()).thenReturn("https://example.com");
assertInstanceOf(JiraBasicAuthConfig.class, jiraAuthFactory.getObject());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,18 @@ public class JiraBasicAuthConfigTest {
private JiraSourceConfig jiraSourceConfig;

private JiraBasicAuthConfig jiraBasicAuthConfig;
String url = "https://example.com";

@BeforeEach
void setUp() {
when(jiraSourceConfig.getAccountUrl()).thenReturn(url);
jiraBasicAuthConfig = new JiraBasicAuthConfig(jiraSourceConfig);
}

@Test
void testGetUrl() {
String url = "https://example.com";
when(jiraSourceConfig.getAccountUrl()).thenReturn(url);
assertEquals(jiraBasicAuthConfig.getUrl(), url + '/');

String url2 = "https://example.com/";
when(jiraSourceConfig.getAccountUrl()).thenReturn(url2);
assertEquals(jiraBasicAuthConfig.getUrl(), url2);

}

@Test
Expand Down

0 comments on commit b9c935a

Please sign in to comment.