Skip to content

Commit

Permalink
spec for MainHelper#time_travel_to
Browse files Browse the repository at this point in the history
  • Loading branch information
ferndopolis authored and michaelkirk committed Feb 26, 2014
1 parent d0deab6 commit 4b9307d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/helpers/main_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require 'spec_helper'

describe TimecopConsole::MainHelper do
describe "#time_travel_to" do
let(:date) { Date.parse('Dec 12, 1950') }

it 'should return a link with timecop console route' do
helper.time_travel_to(date).should == "<a data-method=\"post\" href=\"/timecop_console/update?timecop%5Bcurrent_time%281i%29%5D=1950&amp;timecop%5Bcurrent_time%282i%29%5D=12&amp;timecop%5Bcurrent_time%283i%29%5D=12&amp;timecop%5Bcurrent_time%284i%29%5D=12&amp;timecop%5Bcurrent_time%285i%29%5D=0\" rel=\"nofollow\">December 12, 1950</a>"
end
end
end

0 comments on commit 4b9307d

Please sign in to comment.