Skip to content

Commit

Permalink
signer: test making an xpi with multiple recommended states
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Guthe committed Aug 10, 2020
1 parent d050b18 commit 7dba0f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions signer/xpi/recommendation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func TestMakeRecommendationFile(t *testing.T) {
}

opts := s.GetDefaultOptions().(Options)
opts.Recommendations = []string{"recommended"}
opts.Recommendations = []string{"recommended", "standard"}

recFileBytes, err := s.makeRecommendationFile(opts, "example@mozilla")
if err != nil {
Expand All @@ -210,8 +210,8 @@ func TestMakeRecommendationFile(t *testing.T) {
if rec.AddOnID != "example@mozilla" {
t.Fatalf("unmarshaled recommendation file used unexpected addonid: %q (expected example@mozilla)", rec.AddOnID)
}
if len(rec.States) != 1 && rec.States[0] != "recommended" {
t.Fatalf("unmarshaled recommendation file contains unexpected states: %q (expected [\"recommended\"])", rec.States)
if !(len(rec.States) == 2 && rec.States[0] == "recommended" && rec.States[1] == "standard") {
t.Fatalf("unmarshaled recommendation file with unexpected states: %q (expected [\"recommended\" \"standard\"])", rec.States)
}
})

Expand Down

0 comments on commit 7dba0f6

Please sign in to comment.