Sha256: 6f5c9d6e6c8af242cb9367f40d821d4149b7cd913e874e1030e78364096918f1
Contents?: true
Size: 946 Bytes
Versions: 1
Compression:
Stored size: 946 Bytes
Contents
require_relative "./test_helper" describe BookscanClient do before do stub_requests @client = BookscanClient.new end describe "#books" do it "returns book model array" do books = @client.books assert_equal books.size, 2 assert_equal books[0].filename, "filename1" assert_equal books[0].hash, "hash1" assert_equal books[0].digest, "digest1" assert_equal books[0].image_url, nil assert_equal books[1].filename, "filename2" assert_equal books[1].image_url, "http://example.com/hoge.jpg" end end describe "#optimized_books" do it "returns optimized_book model array" do optbooks = @client.optimized_books assert_equal optbooks.size, 2 assert_equal optbooks[0].filename, "filename1" assert_equal optbooks[0].digest, "digest1" assert_equal optbooks[1].filename, "filename2" assert_equal optbooks[1].digest, "digest2" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bookscan_client-0.0.2 | test/bookscan_client_test.rb |