Browse Source

Add test case with a single app

pull/8/head
Daniel Martí 10 years ago
parent
commit
db14b8a100
  1. 23
      index_test.go

23
index_test.go

@ -62,8 +62,7 @@ func TestLoadIndexXML(t *testing.T) {
}{ }{
{ {
`<fdroid> `<fdroid>
<repo name="Foo" version="14"> <repo name="Foo" version="14"/>
</repo>
</fdroid>`, </fdroid>`,
Index{ Index{
Repo: Repo{ Repo: Repo{
@ -72,6 +71,26 @@ func TestLoadIndexXML(t *testing.T) {
}, },
}, },
}, },
{
`<fdroid>
<repo name="Foo"/>
<application>
<id>foo.bar</id>
<name>Foo bar</name>
</application>
</fdroid>`,
Index{
Repo: Repo{
Name: "Foo",
},
Apps: []App{
{
ID: "foo.bar",
Name: "Foo bar",
},
},
},
},
} }
for _, c := range tests { for _, c := range tests {
r := strings.NewReader(c.in) r := strings.NewReader(c.in)

Loading…
Cancel
Save