-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved everything around to make things clearer and fix a circular dependency Also fixed a couple bugs
- Loading branch information
1 parent
894eafd
commit a55adc7
Showing
33 changed files
with
457 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package models | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
|
||
"github.com/google/uuid" | ||
) | ||
|
||
// Girl's Last Tour chapter 43 uploaded by rozen | ||
const ChapterID = "9a612118-1441-431a-979d-85958fb20cf2" | ||
|
||
func Test_FetchChapter(t *testing.T) { | ||
ctx := context.Background() | ||
|
||
c, err := FetchChapter(ctx, uuid.MustParse(ChapterID), nil) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
if c.Attributes.Title == "" { | ||
t.Fatal("no title") | ||
} | ||
|
||
t.Run("cast manga", func(t *testing.T) { | ||
m := c.Manga() | ||
if m == nil { | ||
t.Fatal("manga did not cast") | ||
} | ||
}) | ||
} | ||
|
||
func Test_FetchImageURLs(t *testing.T) { | ||
ctx := context.Background() | ||
c := Chapter{ID: uuid.MustParse(ChapterID)} | ||
|
||
imgUrls, err := c.FetchImageURLs(ctx) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
if len(imgUrls) == 0 { | ||
t.Fatal("no image urls") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.