Skip to content

Commit

Permalink
Add TestJoinPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Apr 29, 2022
1 parent 0684537 commit 94e5570
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions api/http/router_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package http

// Copyright 2022 Democratized Data Foundation
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestJoinPaths(t *testing.T) {
path := JoinPaths("http://localhost:9181", BlocksPath, "cid_of_some_sort")
assert.Equal(t, "http://localhost:9181"+BlocksPath+"/cid_of_some_sort", path)
}

0 comments on commit 94e5570

Please sign in to comment.