feat(indexers): mam parse vip as freeleech (#407)

This commit is contained in:
ze0s 2022-08-12 16:13:45 +02:00 committed by GitHub
parent 7deac6a781
commit 9c036033e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 2 deletions

View file

@ -444,6 +444,27 @@ func TestRelease_MapVars(t *testing.T) {
"uploader": "Tester",
}},
},
{
name: "10",
fields: &Release{},
want: &Release{
TorrentName: "Greatest Anime Ever",
Year: 2022,
Group: "GROUP1",
Tags: []string{"comedy", "fantasy", "school.life", "shounen", "slice.of.life"},
Uploader: "Tester",
Freeleech: true,
Bonus: []string{"Freeleech"},
},
args: args{varMap: map[string]string{
"torrentName": "Greatest Anime Ever",
"year": "2022",
"releaseGroup": "GROUP1",
"tags": "comedy, fantasy, school.life, shounen, slice.of.life",
"uploader": "Tester",
"freeleech": "VIP",
}},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {