Browse Source

lint

pull/863/head
Ted-U 3 years ago committed by baarkerlounger
parent
commit
b273ae2583
  1. 2
      app/models/sales_log.rb
  2. 5
      spec/features/log_spec.rb

2
app/models/sales_log.rb

@ -47,7 +47,7 @@ class SalesLog < Log
status == "completed"
end
private
private
def update_status!
self.status = if all_fields_completed? && errors.empty?

5
spec/features/log_spec.rb

@ -155,14 +155,15 @@ RSpec.describe "Log Features" do
expect(page).to have_content("2022")
end
end
context "When the sales log feature flag is toggled" do
context "when the sales log feature flag is toggled" do
before do
allow(Rails.env).to receive(:production?).and_return(true)
end
it "hides the create sales log button in production" do
visit("/logs")
expect(page).to_not have_content("Create a new sales log")
expect(page).not_to have_content("Create a new sales log")
end
end
end

Loading…
Cancel
Save