File tree 2 files changed +24
-0
lines changed
lib/elasticsearch/dsl/search/aggregations
spec/elasticsearch/dsl/search/aggregations
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ class DateHistogram
39
39
40
40
option_method :field
41
41
option_method :interval
42
+ option_method :fixed_interval
43
+ option_method :calendar_interval
42
44
option_method :pre_zone
43
45
option_method :post_zone
44
46
option_method :time_zone
Original file line number Diff line number Diff line change 58
58
end
59
59
end
60
60
61
+ describe '#fixed_interval' do
62
+
63
+ before do
64
+ search . fixed_interval ( 'bar' )
65
+ end
66
+
67
+ it 'applies the option' do
68
+ expect ( search . to_hash [ :date_histogram ] [ :foo ] [ :fixed_interval ] ) . to eq ( 'bar' )
69
+ end
70
+ end
71
+
72
+ describe '#calendar_interval' do
73
+
74
+ before do
75
+ search . calendar_interval ( 'bar' )
76
+ end
77
+
78
+ it 'applies the option' do
79
+ expect ( search . to_hash [ :date_histogram ] [ :foo ] [ :calendar_interval ] ) . to eq ( 'bar' )
80
+ end
81
+ end
82
+
61
83
describe '#pre_zone' do
62
84
63
85
before do
You can’t perform that action at this time.
0 commit comments