Пример #1
0
//It should get a single chapter from a book
func (s *TestSuite) TestGetSingleChapterPassage(c *C) {
	//Given a Passage Client
	client := client.PassageClient{Host: s.host}
	passage, err := client.GetSingleChapterPassage("NIV", "Matthew", 1)
	c.Assert(err, Equals, nil)
	c.Assert(len(passage.Verses), Equals, 25)
}
Пример #2
0
//It should get a passage from a different version
func (s *TestSuite) TestGetSingleVerseDiffVersion(c *C) {
	client := client.PassageClient{Host: s.host}
	passage, err := client.GetSingleChapterPassage("ESV", "Matthew", 1)
	c.Assert(err, Equals, nil)
	c.Assert(len(passage.Verses), Equals, 25)
}
Пример #3
0
//It should get multiple verses from a chapter from a book
func (s *TestSuite) TestGetMultiVersePassage(c *C) {
	client := client.PassageClient{Host: s.host}
	passage, err := client.GetMultipleVersesPassage("NIV", "Matthew", 1, 1, 10)
	c.Assert(err, Equals, nil)
	c.Assert(len(passage.Verses), Equals, 10)
}
Пример #4
0
//It should get multiple chapters from a book
func (s *TestSuite) TestGetCrossChapterPassage(c *C) {
	client := client.PassageClient{Host: s.host}
	passage, err := client.GetMultipleChapterPassage("NIV", "Matthew", 1, 2, 25, 1)
	c.Assert(err, Equals, nil)
	c.Assert(len(passage.Verses), Equals, 2)
}