struct Athena::Mercure::Spec::MockHub
inherits Struct
#
Similar to AMC::Hub but does not make any requests to a real Mercure hub.
Instead, it accepts a block that can be used to make assertions against the related AMC::Update, and is expected to return the id of the related update.
Included modules
Athena::Mercure::Hub::Interface
Constructors#
.new(url : String, token_provider : AMC::TokenProvider::Interface, public_url : String | Nil = nil, token_factory : AMC::TokenFactory::Interface | Nil = nil, cookie_name : String | Nil = nil, protocol_version : AMC::ProtocolVersion = :v1, &publisher : AMC::Update -> String)#
Methods#
#cookie_name : String#
Returns the name of the cookie subscribers of this hub are authorized with.
#protocol_version : AMC::ProtocolVersion#
Returns the version of the Mercure protocol this hub speaks.
#token_factory : AMC::TokenFactory::Interface | ::Nil#
Returns the AMC::TokenFactory::Interface associated with this hub.
#token_provider : AMC::TokenProvider::Interface#
Returns the AMC::TokenProvider::Interface associated with this hub.