diff --git a/omaha/omaha_test.go b/omaha/omaha_test.go index 5a3eae4..c2f14b7 100644 --- a/omaha/omaha_test.go +++ b/omaha/omaha_test.go @@ -3,22 +3,23 @@ package omaha import ( "encoding/xml" "fmt" - "io/ioutil" - "os" "testing" ) +const SampleRequest = ` + + + + + + + + +` + func TestOmahaRequestUpdateCheck(t *testing.T) { - file, err := os.Open("../fixtures/update-engine/update/request.xml") - if err != nil { - t.Error(err) - } - fix, err := ioutil.ReadAll(file) - if err != nil { - t.Error(err) - } v := Request{} - xml.Unmarshal(fix, &v) + xml.Unmarshal([]byte(SampleRequest), &v) if v.Os.Version != "Indy" { t.Error("Unexpected version", v.Os.Version)