spec/support/fake_keikoku.rb in keikokuc-0.4 vs spec/support/fake_keikoku.rb in keikokuc-0.5

- old
+ new

@@ -29,13 +29,13 @@ def call(env) with_rack_env(env) do if request_path == '/api/v1/notifications' && request_verb == 'POST' if publisher_by_api_key(request_api_key) - notification = Notification.new({id: next_id}.merge(request_body)) + notification = Notification.new({:id => next_id}.merge(request_body)) @notifications << notification - [200, { }, [Yajl::Encoder.encode({id: notification.id})]] + [200, { }, [Yajl::Encoder.encode({:id => notification.id})]] else [401, { }, ["Not authorized"]] end elsif request_path == '/api/v1/notifications' && request_verb == 'GET' if current_user = authenticate_consumer @@ -48,10 +48,10 @@ if current_user = authenticate_consumer notification = notifications_for_user(current_user).detect do |notification| notification.to_hash[:id].to_s == $1.to_s end notification.mark_read_by!(current_user) - [200, {}, [Yajl::Encoder.encode({read_by: current_user, read_at: Time.now})]] + [200, {}, [Yajl::Encoder.encode({:read_by => current_user, :read_at => Time.now})]] else [401, { }, ["Not authorized"]] end end end