Skip to content

Commit

Permalink
clean(tech): linters
Browse files Browse the repository at this point in the history
  • Loading branch information
mfo committed May 7, 2024
1 parent 2786a57 commit 8988d6b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/models/procedure_revision.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ def compare_revision_transitions_rules(new_revision)
to_transitions_rules = new_revision.transitions_rules
if from_transitions_rules == to_transitions_rules
[]
elsif from_transitions_rules.present? && !to_transitions_rules.present?
elsif from_transitions_rules.present? && to_transitions_rules.blank?
[ProcedureRevisionChange::RemoveTransitionsRule.new(self, new_revision)]
elsif !from_transitions_rules.present? && to_transitions_rules.present?
elsif from_transitions_rules.blank? && to_transitions_rules.present?
[ProcedureRevisionChange::AddTransitionsRule.new(self, new_revision)]
else
[ProcedureRevisionChange::ChangeTransitionsRule.new(self, new_revision)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
let(:routing_rules_stable_ids) { [] }
let(:transitions_rules_stable_ids) { [] }


before do
Flipper.enable_actor(:engagement_juridique_type_de_champ, procedure)
allow_any_instance_of(Procedure).to receive(:stable_ids_used_by_routing_rules).and_return(routing_rules_stable_ids)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
describe 'condition management' do
before { sign_in(admin.user) }

let(:types_de_champ_public) { [{type: :yes_no}]}
let(:types_de_champ_public) { [{ type: :yes_no }] }
let(:yes_no_tdc) { procedure.draft_revision.types_de_champ_public.first }
let(:targeted_champ) { champ_value(yes_no_tdc.stable_id).to_json }
let(:default_params) do
{
procedure_id: procedure.id,
revision_id: procedure.draft_revision.id,
revision_id: procedure.draft_revision.id
}
end

Expand Down

0 comments on commit 8988d6b

Please sign in to comment.