Sha256: ddab968db88e376fec61b9b724164cb490466ebb99dcb825c11f6f7e87b3782e
Contents?: true
Size: 848 Bytes
Versions: 3
Compression:
Stored size: 848 Bytes
Contents
require "spec_helper" describe Lita::Handlers::Info, lita_handler: true do it { routes_command("info").to(:chat) } it { routes_http(:get, "/lita/info").to(:web) } let(:request) { double("Rack::Request") } let(:response) { Rack::Response.new } describe "#chat" do it "responds with the current version of Lita" do send_command("info") expect(replies.last).to include(Lita::VERSION) end it "responds with a link to the website" do send_command("info") expect(replies.last).to include("lita.io") end end describe "#web" do it "returns JSON with info about the running robot" do subject.web(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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lita-3.2.0 | spec/lita/handlers/info_spec.rb |
lita-3.1.0 | spec/lita/handlers/info_spec.rb |
lita-3.0.4 | spec/lita/handlers/info_spec.rb |