Sha256: 2ff93726051d232ef6c04ddefb1615c1b912770c4e5688a248b60a2fd1b53de3
Contents?: true
Size: 881 Bytes
Versions: 9
Compression:
Stored size: 881 Bytes
Contents
require "spec_helper" describe SauceWhisk::Assets do let(:auth) {"#{ENV["SAUCE_USERNAME"]}:#{ENV["SAUCE_ACCESS_KEY"]}"} describe "#fetch", :vcr => {:cassette_name => "assets"} do let(:job_id) {"bd9c43dd6b5549f1b942d1d581d98cac"} let(:asset_name) {"0000screenshot.png"} it "fetches an asset for the requested job" do SauceWhisk::Assets.fetch job_id, asset_name assert_requested :get, "https://#{auth}@saucelabs.com/rest/v1/dylanatsauce/jobs/#{job_id}/assets/#{asset_name}" end it "returns an asset" do SauceWhisk::Assets.fetch(job_id, asset_name).should be_an_instance_of SauceWhisk::Asset end it "initializes the asset properly" do asset = SauceWhisk::Assets.fetch job_id, asset_name asset.name.should eq asset_name asset.job.should eq job_id asset.asset_type.should eq :screenshot end end end
Version data entries
9 entries across 9 versions & 1 rubygems