Skip to content

Commit

Permalink
Merge pull request #290 from observerly/fix/telescope/TestNewTelescop…
Browse files Browse the repository at this point in the history
…eDeclinationRate

fix: amend TestNewTelescopeDeclinationRate in @observerly/alpacago.
  • Loading branch information
michealroberts authored Mar 7, 2024
2 parents a21a013 + 01d3267 commit 63a4c0e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/alpacago/telescope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,18 +628,16 @@ func TestNewTelescopeDeclination(t *testing.T) {
func TestNewTelescopeDeclinationRate(t *testing.T) {
var got, err = telescope.GetDeclinationRate()

var want float64 = 5.000000

if err != nil {
t.Errorf("got %q, wanted %f", err, want)
t.Errorf("got %q", err)
}

if math.Abs(got-want) > 0.00001 {
t.Errorf("got %f, wanted %f", got, want)
if got < 0 || got > 24 {
t.Errorf("got %f, wanted a reasonable value between 0 and 24", got)
}

if telescope.Alpaca.ErrorNumber != 0 {
t.Errorf("got %q, wanted %f", telescope.Alpaca.ErrorMessage, want)
t.Errorf("got %q", telescope.Alpaca.ErrorMessage)
}
}

Expand Down

0 comments on commit 63a4c0e

Please sign in to comment.