Browse Source

lazy evaluation

pull/608/head
JG 3 years ago
parent
commit
a57a11be9b
  1. 8
      spec/features/log_spec.rb

8
spec/features/log_spec.rb

@ -3,10 +3,10 @@ require "rails_helper"
RSpec.describe "Log Features" do RSpec.describe "Log Features" do
context "Searching for specific logs" do context "Searching for specific logs" do
context "I am logged in and there are logs in the database" do context "I am logged in and there are logs in the database" do
let!(:user) { FactoryBot.create(:user, last_sign_in_at: Time.zone.now) } let(:user) { FactoryBot.create(:user, last_sign_in_at: Time.zone.now) }
let!(:log_to_search) { FactoryBot.create(:case_log, owning_organisation: user.organisation, tenancy_code: "111") } let(:log_to_search) { FactoryBot.create(:case_log, owning_organisation: user.organisation, tenancy_code: "111") }
let!(:same_organisation_log) { FactoryBot.create(:case_log, owning_organisation: user.organisation, tenancy_code: "222") } let(:same_organisation_log) { FactoryBot.create(:case_log, owning_organisation: user.organisation, tenancy_code: "222") }
let!(:another_organisation_log) { FactoryBot.create(:case_log, tenancy_code: "333") } let(:another_organisation_log) { FactoryBot.create(:case_log, tenancy_code: "333") }
before do before do
visit("/logs") visit("/logs")

Loading…
Cancel
Save