Sha256: aeb87d3aa8943b9e6a17b917baf1c199d00e7760e7bfb45d6556446d45e25d11
Contents?: true
Size: 615 Bytes
Versions: 3
Compression:
Stored size: 615 Bytes
Contents
require 'spec_helper' describe 'A status request with a TimeCheck' do before do Rapporteur.add_check(Rapporteur::Checks::TimeCheck) end subject { get(status_path) ; response } it_behaves_like 'a successful status response' context 'the response payload' do subject { get(status_path) ; JSON.parse(response.body) } it 'contains the current time in ISO8601' do time = Time.now Time.stub(:now).and_return(time) expect(subject.fetch('time')).to(match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/)) expect(subject.fetch('time')).to(eq(time.utc.iso8601)) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rapporteur-2.1.0 | spec/requests/time_check_spec.rb |
rapporteur-2.0.1 | spec/requests/time_check_spec.rb |
rapporteur-2.0.0 | spec/requests/time_check_spec.rb |