mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-11-26 06:37:07 +00:00
fix(ui): show the PyPI release version in every version display
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
package cache
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestWithReleaseVersion(t *testing.T) {
|
||||
with := withReleaseVersion(map[string]interface{}{"version": "six-1.17.0.tar.gz"}, "1.17.0")
|
||||
if with["release_version"] != "1.17.0" || with["version"] != "six-1.17.0.tar.gz" {
|
||||
t.Errorf("payload = %v", with)
|
||||
}
|
||||
if _, ok := withReleaseVersion(map[string]interface{}{"version": "1.3.0"}, "")["release_version"]; ok {
|
||||
t.Error("empty release version must not be sent")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user