Skip to content

Commit

Permalink
view specs for meds
Browse files Browse the repository at this point in the history
  • Loading branch information
pikesley committed Feb 16, 2016
1 parent c35a194 commit d04d618
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/views/shared/_form.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
describe 'shared/_form.html.erb' do
context 'time-appropriate medication' do
it 'presents humalog by default' do
Timecop.freeze 2016, 02, 16, 11, 00
assign(:metric, build(:medication_event))
render
expect(rendered).to have_select('Insulin', selected: 'humalog')
Timecop.return
end

it 'presents lantus at bedtime' do
Timecop.freeze 2016, 02, 16, 23, 00
assign(:metric, build(:medication_event))
render
expect(rendered).to have_select('Insulin', selected: 'lantus')
Timecop.return
end
end
end

0 comments on commit d04d618

Please sign in to comment.