it'raise error if metrics are not in the same slot'do
describe'.unique_events'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')
it'raise error if metrics are not in the same slot'do
end
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
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')
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
end
it"raise error if metrics don't have same aggregation"do
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')
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
end
it"raise error if metrics don't have same aggregation"do
it"raise error if metrics don't have same aggregation"do