Skip to content

Commit

Permalink
fix: Fix the pipeline URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Semenov committed Sep 18, 2023
1 parent 3111517 commit 537e09f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Radar/App Data Objects/Pipeline.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct Pipeline: Identifiable {
let jobs: [Job]

var url: URL {
concourseUrl.appending(components: "teams", teamName, "pipeline", name)
concourseUrl.appending(components: "teams", teamName, "pipelines", name)
}

var statusIcon: Icon {
Expand Down
4 changes: 2 additions & 2 deletions RadarTests/PipelineSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class PipelineSpec: QuickSpec {
override func spec() {
it("returns the pipeline URL") {
let pipeline = Pipeline(id: 1, name: "pipeline-name", isPaused: false, isPublic: false, concourseUrl: URL(string: "http://localhost")!, teamName: "test-team", jobs: [])
expect(pipeline.url).to(equal(URL(string: "http://localhost/teams/test-team/pipeline/pipeline-name")!))
expect(pipeline.url).to(equal(URL(string: "http://localhost/teams/test-team/pipelines/pipeline-name")!))
}

describe("status") {
Expand Down Expand Up @@ -60,4 +60,4 @@ class PipelineSpec: QuickSpec {
}
}
}
}
}

0 comments on commit 537e09f

Please sign in to comment.