it'raise error if metrics are not in the same slot'do
expect{described_class.unique_events(event_names: %w(g_analytics_contribution g_compliance_dashboard),start_date: 4.weeks.ago,end_date: Date.current)}.toraise_error('Events should be in same slot')
end
it'raise error if metrics are not in the same category'do
expect{described_class.unique_events(event_names: %w(g_analytics_contribution g_analytics_productivity),start_date: 4.weeks.ago,end_date: Date.current)}.toraise_error('Events should be in same category')
end
it"raise error if metrics don't have same aggregation"do
expect{described_class.unique_events(event_names: %w(g_analytics_contribution g_analytics_valuestream),start_date: 4.weeks.ago,end_date: Date.current)}.toraise_error('Events should have same aggregation level')
end
describe'.track_event'do
it"raise error if metrics don't have same aggregation"do
it'raise error if metrics are not in the same slot'do
expect{described_class.unique_events(event_names: %w(g_analytics_contribution g_compliance_dashboard),start_date: 4.weeks.ago,end_date: Date.current)}.toraise_error('Events should be in same slot')
end
it'raise error if metrics are not in the same category'do
expect{described_class.unique_events(event_names: %w(g_analytics_contribution g_analytics_productivity),start_date: 4.weeks.ago,end_date: Date.current)}.toraise_error('Events should be in same category')
end
it"raise error if metrics don't have same aggregation"do
expect{described_class.unique_events(event_names: %w(g_analytics_contribution g_analytics_valuestream),start_date: 4.weeks.ago,end_date: Date.current)}.toraise_error('Events should have same aggregation level')