Sha256: 70be838680380e499f1aa9dd9a4f884edaa44f71ae5c24ea6158f248d4b1ea75

Contents?: true

Size: 929 Bytes

Versions: 38

Compression:

Stored size: 929 Bytes

Contents

require 'test_helper'

module Shipit
  class CommitDeploymentStatusTest < ActiveSupport::TestCase
    setup do
      @status = shipit_commit_deployment_statuses(:shipit2_deploy_third_pending)
      @deployment = @status.commit_deployment
      @task = @deployment.task
      @commit = @deployment.commit
      @author = @deployment.author
    end

    test 'creation on GitHub' do
      response = stub(id: 44, url: 'https://example.com')
      @author.github_api.expects(:create_deployment_status).with(
        @deployment.api_url,
        'pending',
        target_url: "http://shipit.com/shopify/shipit-engine/production/deploys/#{@task.id}",
        description: "walrus triggered the deploy of shopify/shipit-engine/production to #{@commit.sha}",
      ).returns(response)

      @status.create_on_github!
      assert_equal response.id, @status.github_id
      assert_equal response.url, @status.api_url
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
shipit-engine-0.29.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.28.1 test/models/commit_deployment_status_test.rb
shipit-engine-0.28.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.27.1 test/models/commit_deployment_status_test.rb
shipit-engine-0.27.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.26.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.25.1 test/models/commit_deployment_status_test.rb
shipit-engine-0.25.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.24.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.23.1 test/models/commit_deployment_status_test.rb
shipit-engine-0.23.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.22.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.21.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.20.1 test/models/commit_deployment_status_test.rb
shipit-engine-0.20.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.19.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.18.1 test/models/commit_deployment_status_test.rb
shipit-engine-0.18.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.17.0 test/models/commit_deployment_status_test.rb
shipit-engine-0.16.0 test/models/commit_deployment_status_test.rb