Sha256: 6272557ad572e986bd1c49db31ebadd4f6ddc1e248f46a458c2326d3226204e4

Contents?: true

Size: 1.63 KB

Versions: 24

Compression:

Stored size: 1.63 KB

Contents

require 'spec_helper'
require 'dpl/provider/testfairy'

describe DPL::Provider::TestFairy do

  before (:all) do

    @local_android_app = '/tmp/android.apk'
    %x[curl -Lso #{@local_android_app} http://www.testfairy.com/support-files/travis/dpl/android.apk]

    @local_ios_app = '/tmp/ios.ipa'
    %x[curl -Lso #{@local_ios_app} http://www.testfairy.com/support-files/travis/dpl/Empty.ipa]

  end

  let :context do
    DummyContext.new
  end

  subject :provider do
    # the account is travis-test@testfairy.com
    described_class.new(context, :api_key => '4b85a2c03ba6026f4e22640a0432638180e1d1ea', :video => "true", :video_quality => 'low')
  end


  describe "#check_auth" do

    example "check_auth without app_file" do
      expect {provider.check_auth}.to raise_error("App file is missing")
    end

    example "check_auth with app_file" do
      provider.options.update(:app_file => @local_android_app)
      provider.check_auth
    end
  end

  describe "#needs_key?" do
    example do
      expect(provider.needs_key?).to eq(false)
    end
  end

  describe "#push_app" do
    example "push_app without app_file" do
      expect {provider.check_auth }.to raise_error("App file is missing")
    end

    skip "push_app with app_file" do
      provider.options.update(:app_file => @local_android_app)
      provider.push_app
    end

    skip "push_app with iOS app_file" do
      provider.options.update(:app_file => @local_ios_app)
      provider.push_app
    end

    skip "push_app with notifify param" do
      provider.options.update(:app_file => @local_ios_app)
      provider.options.update(:notify => true)
      provider.push_app
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
dpl-testfairy-1.10.17.travis.6637.6 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.16 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.16.travis.6625.6 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.16.travis.6619.6 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.16.travis.5961.5 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.15 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.15.travis.5877.5 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.14 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.13 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.13.travis.4159.5 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.13.travis.4141.5 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.13.travis.4040.5 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.13.travis.4033.5 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.12 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.12.travis.3794.5 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.12.travis.3506.5 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.11.travis.3504.5 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.11 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.11.travis.3499.5 spec/provider/testfairy_spec.rb
dpl-testfairy-1.10.11.travis.3497.5 spec/provider/testfairy_spec.rb