Sha256: 8f03f3ec2988844d9221fb82a2f42305f67ea007bd3beb41569bb516d61f4232

Contents?: true

Size: 1011 Bytes

Versions: 1

Compression:

Stored size: 1011 Bytes

Contents

require "spec_helper"

module FitterHappier
  RSpec.describe "FitterHappierRequestSpec", type: :request do

    it "can GET index" do
      get "/fitter_happier"

      expect(response.status).to eq(200)
      expect(response.body).to match(/FitterHappier Site Check Passed/)
    end

    it "can GET site_check" do
      get "/fitter_happier/site_check"

      expect(response.status).to eq(200)
      expected_body = %r{FitterHappier Site Check Passed @ [A-z]{3}, \d{2} [A-z]{3} \d{4} \d{2}:\d{2}:\d{2} [0-9\-]+}
      expect(response.body).to match(expected_body)
    end

    it "can GET site_and_database_check" do
      expect(DatabaseCheck).to receive(:schema_version).and_return(12345)

      get "/fitter_happier/site_and_database_check"

      expect(response.status).to eq(200)
      expected_body = %r{FitterHappier Site and Database Check Passed @ [A-z]{3}, \d{2} [A-z]{3} \d{4} \d{2}:\d{2}:\d{2} [0-9\-]+\nSchema Version: \d+}
      expect(response.body).to match(expected_body)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nulogy-fitter-happier-1.0.0 spec/fitter_happier_request_spec.rb