Commit iniziale di eminuxCRM: CRM Rails con pipeline, campagne email e Docker.
CI / scan_ruby (push) Failing after 11m20s
CI / scan_js (push) Successful in 10m35s
CI / lint (push) Has been cancelled

Include autenticazione, progetti isolati, mail marketing HTML con SMTP, test A/B e editor WYSIWYG.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-17 23:01:48 +02:00
co-authored by Cursor
commit c4e5f289cf
258 changed files with 11293 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
require "test_helper"
class OpportunityTest < ActiveSupport::TestCase
setup do
@opp = opportunities(:deal)
@user = users(:marco)
Current.user = @user
Current.project = projects(:matchlivetv)
end
teardown do
Current.user = nil
Current.project = nil
end
test "move to won sets won_at and activates customer" do
@opp.move_to_stage!("won", user: @user)
assert @opp.won?
assert_not_nil @opp.won_at
assert_equal "active_customer", @opp.organization.reload.status
end
test "move to lost requires reason" do
assert_raises(ActiveRecord::RecordInvalid) do
@opp.move_to_stage!("lost", user: @user)
end
end
test "move to lost with reason" do
@opp.move_to_stage!("lost", lost_reason: "price", user: @user)
assert @opp.lost?
assert_equal "price", @opp.lost_reason
assert_not_nil @opp.lost_at
end
end