assert_equal0,builder.mapped_attributes[:recurrence_selector],"selector should be 0 for monthly_every_x_day"
assert_equal'5',builder.mapped_attributes[:every_other1],"every_other1 should be set to monthly_every_x_days"
assert_equal'10',builder.mapped_attributes[:every_other2],"every_other2 should be set to monthly_every_x_month when selector is monthly_every_x_day (=0)"
assert_equal'7',builder.mapped_attributes[:every_other3],"every_other3 should be set to monthly_every_xth_day"
assert_equal3,builder.mapped_attributes[:every_count],"every_count should be set to monthly_day_of_week"
builder.build
assertbuilder.pattern.every_x_day?,"every_x_day? should say true for selector monthly_every_x_day"
attributes={
'recurring_period'=>'monthly',
'description'=>'a repeating todo',# generic
'monthly_selector'=>'monthly_every_xth_day',# monthly specific
'monthly_every_x_day'=>'5',# mapped to :every_other1
'monthly_every_x_month'=>'10',# not mapped
'monthly_every_x_month2'=>'20'# mapped to :every_other2
assert_equal1,builder.mapped_attributes[:recurrence_selector],"selector should be 1 for monthly_every_xth_day"
assert_equal'20',builder.mapped_attributes[:every_other2],"every_other2 should be set to monthly_every_x_month2 when selector is monthly_every_xth_day (=0)"
builder.build
assertbuilder.pattern.every_xth_day?,"every_xth_day? should say true for selector monthly_every_xth_day"