Sha256: e78de7fb83e90093229af79dcca1143f5c88d11fbeca5654b6240914a1169c4e

Contents?: true

Size: 578 Bytes

Versions: 13

Compression:

Stored size: 578 Bytes

Contents

require "spec_helper"

describe Lita::Handlers::Web, lita_handler: true do
  it { routes_http(:get, "/lita/info").to(:info) }
  it { doesnt_route_http(:post, "/lita/info").to(:info) }

  let(:request) { double("Rack::Request") }
  let(:response) { Rack::Response.new }

  describe "#info" do
    it "returns JSON with info about the running robot" do
      subject.info(request, response)
      expect(response.headers["Content-Type"]).to eq("application/json")
      expect(response.body.join).to include(
        %{"lita_version":"#{Lita::VERSION}"}
      )
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
lita-2.7.2 spec/lita/handlers/web_spec.rb
lita-2.7.1 spec/lita/handlers/web_spec.rb
lita-2.7.0 spec/lita/handlers/web_spec.rb
lita-2.6.0 spec/lita/handlers/web_spec.rb
lita-2.5.0 spec/lita/handlers/web_spec.rb
lita-2.4.0 spec/lita/handlers/web_spec.rb
lita-2.3.0 spec/lita/handlers/web_spec.rb
lita-2.2.1 spec/lita/handlers/web_spec.rb
lita-2.2.0 spec/lita/handlers/web_spec.rb
lita-2.1.2 spec/lita/handlers/web_spec.rb
lita-2.1.1 spec/lita/handlers/web_spec.rb
lita-2.1.0 spec/lita/handlers/web_spec.rb
lita-2.0.0 spec/lita/handlers/web_spec.rb