Fix minor typos
This commit is contained in:
parent
c5b657ba05
commit
c90f19ec21
10 changed files with 21 additions and 21 deletions
|
@ -61,7 +61,7 @@ describe("model/account", () => {
|
|||
const values2 = {ID: 6, Title: "Crazy Cat 2", UID: 783};
|
||||
const photo2 = new Photo(values2);
|
||||
const Photos = [photo, photo2];
|
||||
account.Share(Photos, "destinaton").then(
|
||||
account.Share(Photos, "destination").then(
|
||||
(response) => {
|
||||
assert.equal(response, "share success");
|
||||
done();
|
||||
|
|
|
@ -76,7 +76,7 @@ describe("model/file", () => {
|
|||
assert.equal(file3.thumbnailUrl("abc"), "/api/v1/svg/raw");
|
||||
});
|
||||
|
||||
it("should return downlaload url", () => {
|
||||
it("should return download url", () => {
|
||||
const values = {
|
||||
InstanceID: 5,
|
||||
UID: "ABC123",
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
|
||||
var log = event.Log
|
||||
|
||||
// childAlreadyRunning tests if a .pid file at filePath is a running proccess.
|
||||
// childAlreadyRunning tests if a .pid file at filePath is a running process.
|
||||
// it returns the pid value and the running status (true or false).
|
||||
func childAlreadyRunning(filePath string) (pid int, running bool) {
|
||||
if !fs.FileExists(filePath) {
|
||||
|
|
|
@ -238,7 +238,7 @@ func TestAccount_Save(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
initalDate := model.UpdatedAt
|
||||
initialDate := model.UpdatedAt
|
||||
|
||||
err = model.Save()
|
||||
|
||||
|
@ -246,7 +246,7 @@ func TestAccount_Save(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
afterDate := model.UpdatedAt
|
||||
assert.True(t, afterDate.After(initalDate))
|
||||
assert.True(t, afterDate.After(initialDate))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/photoprism/photoprism/internal/maps"
|
||||
)
|
||||
|
||||
// altCountryNames defines mapping between different names for the same countriy
|
||||
// altCountryNames defines mapping between different names for the same country
|
||||
var altCountryNames = map[string]string{
|
||||
"United States of America": "USA",
|
||||
"United States": "USA",
|
||||
|
|
|
@ -65,7 +65,7 @@ func TestPhoto_Optimize(t *testing.T) {
|
|||
t.Error("photo should NOT be updated")
|
||||
}
|
||||
})
|
||||
t.Run("photo withouth id", func(t *testing.T) {
|
||||
t.Run("photo without id", func(t *testing.T) {
|
||||
photo := Photo{}
|
||||
bool, err := photo.Optimize()
|
||||
assert.Error(t, err)
|
||||
|
|
|
@ -11,25 +11,25 @@ import (
|
|||
func TestOSM_Category(t *testing.T) {
|
||||
t.Run("hill", func(t *testing.T) {
|
||||
|
||||
l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "dipslay name"}
|
||||
l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "display name"}
|
||||
assert.Equal(t, "hill", l.Category())
|
||||
})
|
||||
|
||||
t.Run("water", func(t *testing.T) {
|
||||
|
||||
l := &Location{LocCategory: "", LocName: "Nice title", LocType: "water", LocDisplayName: "dipslay name"}
|
||||
l := &Location{LocCategory: "", LocName: "Nice title", LocType: "water", LocDisplayName: "display name"}
|
||||
assert.Equal(t, "water", l.Category())
|
||||
})
|
||||
|
||||
t.Run("shop", func(t *testing.T) {
|
||||
|
||||
l := &Location{LocCategory: "shop", LocName: "Nice title", LocType: "", LocDisplayName: "dipslay name"}
|
||||
l := &Location{LocCategory: "shop", LocName: "Nice title", LocType: "", LocDisplayName: "display name"}
|
||||
assert.Equal(t, "shop", l.Category())
|
||||
})
|
||||
|
||||
t.Run("no label found", func(t *testing.T) {
|
||||
|
||||
l := &Location{LocCategory: "xxx", LocName: "Nice title", LocType: "", LocDisplayName: "dipslay name"}
|
||||
l := &Location{LocCategory: "xxx", LocName: "Nice title", LocType: "", LocDisplayName: "display name"}
|
||||
assert.Equal(t, "", l.Category())
|
||||
})
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ func TestOSM_State(t *testing.T) {
|
|||
t.Run("Berlin", func(t *testing.T) {
|
||||
|
||||
a := Address{CountryCode: "de", City: "Berlin", State: "Berlin", HouseNumber: "63", Suburb: "Neukölln"}
|
||||
l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "dipslay name", Address: a}
|
||||
l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "display name", Address: a}
|
||||
assert.Equal(t, "Berlin", l.State())
|
||||
})
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ func TestOSM_Suburb(t *testing.T) {
|
|||
t.Run("Neukölln", func(t *testing.T) {
|
||||
|
||||
a := Address{CountryCode: "de", City: "Berlin", State: "Berlin", HouseNumber: "63", Suburb: "Neukölln"}
|
||||
l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "dipslay name", Address: a}
|
||||
l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "display name", Address: a}
|
||||
assert.Equal(t, "Neukölln", l.Suburb())
|
||||
})
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ func TestOSM_CountryCode(t *testing.T) {
|
|||
t.Run("de", func(t *testing.T) {
|
||||
|
||||
a := Address{CountryCode: "de", City: "Berlin", State: "Berlin", HouseNumber: "63", Suburb: "Neukölln"}
|
||||
l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "dipslay name", Address: a}
|
||||
l := &Location{LocCategory: "natural", LocName: "Nice title", LocType: "hill", LocDisplayName: "display name", Address: a}
|
||||
assert.Equal(t, "de", l.CountryCode())
|
||||
})
|
||||
}
|
||||
|
|
|
@ -10,32 +10,32 @@ import (
|
|||
|
||||
func TestOSM_Name(t *testing.T) {
|
||||
t.Run("Nice Name", func(t *testing.T) {
|
||||
l := &Location{LocCategory: "natural", LocName: "Nice Name", LocType: "hill", LocDisplayName: "dipslay name"}
|
||||
l := &Location{LocCategory: "natural", LocName: "Nice Name", LocType: "hill", LocDisplayName: "display name"}
|
||||
assert.Equal(t, "Nice Name", l.Name())
|
||||
})
|
||||
|
||||
t.Run("Water", func(t *testing.T) {
|
||||
l := &Location{LocCategory: "", LocName: "", LocType: "water", LocDisplayName: "dipslay name"}
|
||||
l := &Location{LocCategory: "", LocName: "", LocType: "water", LocDisplayName: "display name"}
|
||||
assert.Equal(t, "Water", l.Name())
|
||||
})
|
||||
|
||||
t.Run("Nice Name 2", func(t *testing.T) {
|
||||
l := &Location{LocCategory: "shop", LocName: "Nice Name 2", LocType: "", LocDisplayName: "dipslay name"}
|
||||
l := &Location{LocCategory: "shop", LocName: "Nice Name 2", LocType: "", LocDisplayName: "display name"}
|
||||
assert.Equal(t, "Nice Name 2", l.Name())
|
||||
})
|
||||
|
||||
t.Run("Cat", func(t *testing.T) {
|
||||
l := &Location{LocCategory: "xxx", LocName: "Cat,Dog", LocType: "", LocDisplayName: "dipslay name"}
|
||||
l := &Location{LocCategory: "xxx", LocName: "Cat,Dog", LocType: "", LocDisplayName: "display name"}
|
||||
assert.Equal(t, "Cat", l.Name())
|
||||
})
|
||||
|
||||
t.Run("airport", func(t *testing.T) {
|
||||
l := &Location{LocCategory: "aeroway", LocName: "", LocType: "", LocDisplayName: "dipslay name"}
|
||||
l := &Location{LocCategory: "aeroway", LocName: "", LocType: "", LocDisplayName: "display name"}
|
||||
assert.Equal(t, "Airport", l.Name())
|
||||
})
|
||||
|
||||
t.Run("Cow", func(t *testing.T) {
|
||||
l := &Location{LocCategory: "xxx", LocName: "Cow - Cat - Dog", LocType: "", LocDisplayName: "dipslay name"}
|
||||
l := &Location{LocCategory: "xxx", LocName: "Cow - Cat - Dog", LocType: "", LocDisplayName: "display name"}
|
||||
assert.Equal(t, "Cow", l.Name())
|
||||
})
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ func TestExif(t *testing.T) {
|
|||
if err := data.JSON("testdata/orientation.json", "foo.jpg"); err != nil {
|
||||
assert.EqualError(t, err, "metadata: original name foo.jpg does not match orientation.jpg (exiftool)")
|
||||
} else {
|
||||
t.Error("error expected when providing wrong orginal name")
|
||||
t.Error("error expected when providing wrong original name")
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue