@@ -10,12 +10,12 @@ defmodule Algora.AnalyticsTest do
10
10
last_month = DateTime . add ( now , - 40 * 24 * 3600 )
11
11
12
12
Enum . reduce ( 1 .. 100 , now , fn _n , date ->
13
- insert ( :organization , % { inserted_at: date , seeded: false , activated: false } )
13
+ insert ( :organization , % { inserted_at: date , activated: false } )
14
14
DateTime . add ( date , - 1 * 24 * 3600 )
15
15
end )
16
16
17
17
Enum . reduce ( 1 .. 100 , now , fn _n , date ->
18
- org = insert ( :organization , % { inserted_at: date , seeded: true , activated: true } )
18
+ org = insert ( :organization , % { inserted_at: date , activated: true } )
19
19
insert_list ( 2 , :contract , % { client_id: org . id , status: :active } )
20
20
insert_list ( 1 , :contract , % { client_id: org . id , status: :paid } )
21
21
insert_list ( 3 , :contract , % { client_id: org . id , status: :cancelled } )
@@ -49,7 +49,7 @@ defmodule Algora.AnalyticsTest do
49
49
50
50
now = DateTime . utc_now ( )
51
51
last_month = DateTime . add ( now , - 40 * 24 * 3600 )
52
- insert ( :organization , % { inserted_at: last_month , seeded: true , activated: true } )
52
+ insert ( :organization , % { inserted_at: last_month , activated: true } )
53
53
54
54
{ :ok , resp } = Analytics . get_company_analytics ( "30d" )
55
55
assert resp . total_companies == 201
@@ -59,9 +59,9 @@ defmodule Algora.AnalyticsTest do
59
59
assert resp . companies_trend == :down
60
60
assert resp . active_trend == :down
61
61
62
- insert ( :organization , % { seeded: true , activated: true } )
63
- insert ( :organization , % { seeded: true , activated: true } )
64
- insert ( :organization , % { seeded: false , activated: false } )
62
+ insert ( :organization , % { activated: true } )
63
+ insert ( :organization , % { activated: true } )
64
+ insert ( :organization , % { activated: false } )
65
65
66
66
{ :ok , resp } = Analytics . get_company_analytics ( "30d" )
67
67
@@ -84,7 +84,7 @@ defmodule Algora.AnalyticsTest do
84
84
end
85
85
86
86
test "get_company_analytics 7d" do
87
- insert ( :organization , % { seeded: true , activated: true } )
87
+ insert ( :organization , % { activated: true } )
88
88
{ :ok , resp } = Analytics . get_company_analytics ( "7d" )
89
89
assert resp . total_companies == 201
90
90
assert resp . active_companies == 101
0 commit comments