diaspora_federation/spec/routing/fetch_routing_spec.rb
Benjamin Neff 1dfe57ea7e
Add frozen_string_literal to all files
and remove redundant freezes
2019-10-21 03:11:12 +02:00

37 lines
1,013 B
Ruby

# frozen_string_literal: true
module DiasporaFederation
describe ReceiveController, type: :routing do
routes { DiasporaFederation::Engine.routes }
let(:guid) { "12345678901234567890abcdefgh" }
it "routes post fetch" do
expect(get: "/fetch/post/#{guid}").to route_to(
controller: "diaspora_federation/fetch",
action: "fetch",
type: "post",
guid: guid
)
end
it "routes post fetch" do
expect(get: "/fetch/status_message/#{guid}").to route_to(
controller: "diaspora_federation/fetch",
action: "fetch",
type: "status_message",
guid: guid
)
end
it "routes post fetch with GUID with dots (hubzilla)" do
guid = "1234567890abcd@hubzilla.example.org"
expect(get: "/fetch/post/#{guid}").to route_to(
controller: "diaspora_federation/fetch",
action: "fetch",
type: "post",
guid: guid
)
end
end
end