diff --git a/app/controllers/heartbeat_controller.rb b/app/controllers/heartbeat_controller.rb index 23839bc..44a7889 100644 --- a/app/controllers/heartbeat_controller.rb +++ b/app/controllers/heartbeat_controller.rb @@ -2,8 +2,10 @@ class HeartbeatController < ApplicationController def index - message = { data: { healthy: true } } - - render(json: message) + render( + plain: "OK", + status: :ok, + content_type: "text/plain", + ) end end diff --git a/spec/requests/heartbeat_controller_spec.rb b/spec/requests/heartbeat_controller_spec.rb index 37a1982..7a3f78d 100644 --- a/spec/requests/heartbeat_controller_spec.rb +++ b/spec/requests/heartbeat_controller_spec.rb @@ -13,15 +13,13 @@ it "returns json" do get "/heartbeat" - expect(response.content_type).to(eq("application/json; charset=utf-8")) + expect(response.content_type).to(eq("text/plain; charset=utf-8")) end it "returns the expected data" do get "/heartbeat" - expected = { data: { healthy: true } } - - expect(JSON.parse(response.body, symbolize_names: true)).to(eq(expected)) + expect(response.body).to(eq("OK")) end end end