Class: RubyPitaya::PostmanSpecHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/core/spec-helpers/postman_spec_helper.rb

Instance Method Summary collapse

Constructor Details

#initializePostmanSpecHelper

Returns a new instance of PostmanSpecHelper.



5
6
7
# File 'lib/rubypitaya/core/spec-helpers/postman_spec_helper.rb', line 5

def initialize
  @postman_mock = nil
end

Instance Method Details

#bind_session(session) ⇒ Object



9
10
11
12
13
# File 'lib/rubypitaya/core/spec-helpers/postman_spec_helper.rb', line 9

def bind_session(session)
  response = @postman_mock&.bind_session(session)
  response ||= {}
  response
end

#push_to_user(uid, message_route, payload) ⇒ Object



15
16
17
18
19
# File 'lib/rubypitaya/core/spec-helpers/postman_spec_helper.rb', line 15

def push_to_user(uid, message_route, payload)
  response = @postman_mock&.push_to_user(uid, message_route, payload)
  response ||= {}
  response
end