Whitespace is collapsed, so no need to match multiple in the parser.
Fix exact start times with recurring events, when the start time precedes the interval in the expression, i.e: starting at 2015-01-01 09:00:00 run every other minute for 2 days FossilOrigin-Name: 0fb500373ccb3d17bcc66ee66cc2c513f2abd343d90a516bb8e9ed2c957deda0
This commit is contained in:
parent
f3c9b10b95
commit
9364c9df09
3 changed files with 35 additions and 18 deletions
|
|
@ -323,6 +323,14 @@ describe Symphony::Metronome::IntervalExpression do
|
|||
expect( parsed.interval ).to be( 60.0 )
|
||||
end
|
||||
|
||||
it 'starting at 2010-01-02 09:00:00 run once a day' do |example|
|
||||
parsed = described_class.parse( example.description )
|
||||
expect( parsed.valid ).to be_truthy
|
||||
expect( parsed.recurring ).to be_truthy
|
||||
expect( parsed.starting ).to eq( past + 75600 )
|
||||
expect( parsed.interval ).to be( 86400.0 )
|
||||
end
|
||||
|
||||
it 'always sets a start time if one is not specified' do
|
||||
parsed = described_class.parse( 'every 5 seconds' )
|
||||
expect( parsed.valid ).to be_truthy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue