Implement loading and storing config to / from file
This commit is contained in:
@@ -51,5 +51,19 @@ func TestValidateInstanceWorks(t *testing.T) {
|
||||
t.Fatalf("Output of ValidateInstanceLink() is not https://hessen.museum-digital.de where it should be")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Test that ValidateInstanceLink() works with a valid instance of md and cleans paths.
|
||||
func TestValidateInstanceDoesCleanPathFromUrl(t *testing.T) {
|
||||
|
||||
result, err := ValidateInstanceLink("https://hessen.museum-digital.de/home")
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("ValidateInstanceLink() returns an error where it should work")
|
||||
}
|
||||
if result != "https://hessen.museum-digital.de" {
|
||||
t.Fatalf("Output of ValidateInstanceLink() is not https://hessen.museum-digital.de where it should be")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user