aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXinhui2017-06-01 12:55:54 +0200
committerXinhui2017-06-01 12:55:54 +0200
commita0db62865669cd2573797a25e3ce3fca4e1ef3e0 (patch)
tree7ea887f44709307abd241192b0a64a5568fba327
parente778ac449fd96324fe5963a22d446979f3623774 (diff)
downloadchouette-core-a0db62865669cd2573797a25e3ce3fca4e1ef3e0.tar.bz2
Fix rspec time_table#update_state exclude && include date
-rw-r--r--spec/models/chouette/time_table_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/chouette/time_table_spec.rb b/spec/models/chouette/time_table_spec.rb
index de3e8e07d..89f70310e 100644
--- a/spec/models/chouette/time_table_spec.rb
+++ b/spec/models/chouette/time_table_spec.rb
@@ -145,7 +145,7 @@ describe Chouette::TimeTable, :type => :model do
end
it 'should create new include date' do
- day = state['current_month'].first
+ day = state['current_month'].find{|d| !d['excluded_date'] && !d['include_date'] }
date = Date.parse(day['date'])
day['include_date'] = true
expect(subject.included_days).not_to include(date)
@@ -157,7 +157,7 @@ describe Chouette::TimeTable, :type => :model do
end
it 'should create new exclude date' do
- day = state['current_month'].first
+ day = state['current_month'].find{|d| !d['excluded_date'] && !d['include_date']}
date = Date.parse(day['date'])
day['excluded_date'] = true
expect(subject.excluded_days).not_to include(date)