Skip to content

Commit

Permalink
Remove fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasrutishauser committed Nov 14, 2024
1 parent afcb8c3 commit e0e06e5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 28 deletions.
18 changes: 0 additions & 18 deletions lib/modules/datasource/maven/__fixtures__/pom.relocation.xml

This file was deleted.

35 changes: 25 additions & 10 deletions lib/modules/datasource/maven/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,14 @@ describe('modules/datasource/maven/index', () => {

describe('supports relocation', () => {
it('with only groupId present', async () => {
const pom = Fixtures.get('pom.relocation.xml');
const pom = `
<project>
<distributionManagement>
<relocation>
<groupId>io.example</groupId>
</relocation>
</distributionManagement>
</project>`;
mockGenericPackage({ pom, html: null });

const res = await get();
Expand All @@ -366,10 +373,14 @@ describe('modules/datasource/maven/index', () => {
});

it('with only artifactId present', async () => {
const pom = Fixtures.get('pom.relocation.xml').replace(
'<groupId>io.example</groupId>',
'<artifactId>foo</artifactId>',
);
const pom = `
<project>
<distributionManagement>
<relocation>
<artifactId>foo</artifactId>
</relocation>
</distributionManagement>
</project>`;
mockGenericPackage({ pom, html: null });

const res = await get();
Expand All @@ -380,13 +391,17 @@ describe('modules/datasource/maven/index', () => {
});

it('with all elments present', async () => {
const pom = Fixtures.get('pom.relocation.xml').replace(
'<groupId>io.example</groupId>',
`<groupId>io.example</groupId>
const pom = `
<project>
<distributionManagement>
<relocation>
<groupId>io.example</groupId>
<artifactId>foo</artifactId>
<version>1.2.3</version>
<message>test relocation</message>`,
);
<message>test relocation</message>
</relocation>
</distributionManagement>
</project>`;
mockGenericPackage({ pom, html: null });

const res = await get();
Expand Down

0 comments on commit e0e06e5

Please sign in to comment.