|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
require "rails_helper" |
|
|
|
|
|
|
|
|
|
RSpec.describe LettingsLogsController, type: :request do |
|
|
|
|
include ActiveSupport::Testing::TimeHelpers |
|
|
|
|
|
|
|
|
|
let(:user) { FactoryBot.create(:user) } |
|
|
|
|
let(:owning_organisation) { user.organisation } |
|
|
|
@ -51,10 +50,14 @@ RSpec.describe LettingsLogsController, type: :request do
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
travel_to Time.utc(2022, 2, 8, 16, 52, 15) |
|
|
|
|
Timecop.freeze(Time.utc(2022, 2, 8,)) |
|
|
|
|
post "/logs", headers:, params: params.to_json |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
after do |
|
|
|
|
Timecop.unfreeze |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "returns http success" do |
|
|
|
|
expect(response).to have_http_status(:success) |
|
|
|
|
end |
|
|
|
|