spec/fontist/downloader_spec.rb in fontist-0.2.0 vs spec/fontist/downloader_spec.rb in fontist-0.3.0

- old
+ new

@@ -1,9 +1,8 @@ require "spec_helper" - RSpec.describe Fontist::Downloader do - describe ".download", api_call: true do + describe ".download", file_download: true do it "return the valid downloaded file" do tempfile = Fontist::Downloader.download( sample_file[:file], sha: sample_file[:sha], file_size: sample_file[:file_size], @@ -18,18 +17,18 @@ Fontist::Downloader.download( sample_file[:file], sha: sample_file[:sha] + "mm", file_size: sample_file[:file_size] ) - }.to raise_error(Fontist::Error, "Invalid / Tempared file") + }.to raise_error(Fontist::Errors::TemparedFileError) end end def sample_file @sample_file ||= { - file_size: 10132625, - file: "https://unsplash.com/photos/ZXHgEIWELYA/download?force=true", - sha: "b701889c51802f6f382206e6d0aa3509c8f98e10f26bd0725ae91d93e148fe7a" + file_size: 150899, + file: "https://drive.google.com/u/0/uc?id=1Kk-rpLyQk98ubgxhTRKD2ZkMoY9KqKXk&export=download", + sha: "5e513e4bfdada0ff10dd5b96414fcaeade84e235ce043865416ad7673cb6f3d8" } end end