Sha256: 48a1788ba4714f92d57c367d57ea8bc929c2d125a871d72db51721e6aa7eec0e
Contents?: true
Size: 618 Bytes
Versions: 53
Compression:
Stored size: 618 Bytes
Contents
class Ey::Core::Client class Real def authorized_channel(path) request( :path => "/channels", :params => {"channel" => {"path" => path}} ) end end # Real class Mock def authorized_channel(path) if task = self.data[:tasks].values.find { |t| Addressable::URI.parse(t["read_channel"]).query_values["subscription"] == path } response( :body => {"task" => task}, ) else response(status: 404, :body => {"errors" => ["Couldn't find Awsm::Task with [channel_path: #{path}]"]}) end end end # Mock end # Ey::Core::Client
Version data entries
53 entries across 53 versions & 3 rubygems