diff options
Diffstat (limited to 'spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb')
-rw-r--r-- | spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb b/spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb index 0e7b909fce9..cf539174587 100644 --- a/spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb +++ b/spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb @@ -45,9 +45,19 @@ RSpec.shared_examples 'unlicensed cycle analytics request params' do end end + context 'when the date range is exactly 180 days' do + before do + params[:created_before] = '2019-06-30' + end + + it 'is valid' do + expect(subject).to be_valid + end + end + context 'when the date range exceeds 180 days' do before do - params[:created_before] = '2019-07-15' + params[:created_before] = '2019-07-01' end it 'is invalid' do |