Sha256: baa98a6aaf917b815d94bc68f3bdb58ed16e088f865771966accadca85c16d7f

Contents?: true

Size: 907 Bytes

Versions: 1

Compression:

Stored size: 907 Bytes

Contents

require 'spec_helper'

module Overlay
  describe GithubController do
    include RSpec::Rails::ControllerExampleGroup
    before :each do
      Overlay.configuration.reset if Overlay.configuration

      Overlay.configure do |config|
        config.repositories << Overlay::GithubRepo.new({
                                org: 'test_org',
                                repo: 'test_repo',
                                auth: 'test_user:test_pass',
                                root_source_path: 'spec',
                                root_dest_path: 'spec'
                              })
      end
    end

    describe "POST 'update'" do
      it "returns http success" do
        expect(Overlay::Github.instance).to receive(:process_hook).once {true}
        post 'update', {:use_route => :overlay, :ref => "refs/heads/master", :repository => {:name => 'test_repo'}}
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
overlay-2.3.0 spec/controllers/overlay/github_controller_spec.rb