Sha256: b7e942bd057ff38f2e3accebe0774e6311ebc184f2d7843f8ed0a79e1727ddfc
Contents?: true
Size: 864 Bytes
Versions: 4
Compression:
Stored size: 864 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lita-3.0.3 | spec/lita/handlers/info_spec.rb |
lita-3.0.2 | spec/lita/handlers/info_spec.rb |
lita-3.0.1 | spec/lita/handlers/info_spec.rb |
lita-3.0.0 | spec/lita/handlers/info_spec.rb |