Skip to content

Commit

Permalink
Failing test showing that #import adds timestamps to data
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Cobbett committed May 9, 2011
1 parent 6555fd7 commit 7e45e23
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/import_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@
setup do
Delorean.time_travel_to("5 minutes ago") do
assert_difference "Book.count", +1 do
result = Book.import [:title, :author_name, :publisher], [["LDAP", "Big Bird", "Del Rey"]]
@input_dataset = [["LDAP", "Big Bird", "Del Rey"]]
result = Book.import [:title, :author_name, :publisher], @input_dataset
end
end
@book = Book.last
Expand All @@ -195,6 +196,10 @@
it "should set the updated_on column for new records" do
assert_equal 5.minutes.ago.strftime("%H:%M"), @book.updated_on.strftime("%H:%M")
end

it "should not alter the input dataset" do
assert_equal [["LDAP", "Big Bird", "Del Rey"]], @input_dataset
end
end

context "when a custom time zone is set" do
Expand Down

0 comments on commit 7e45e23

Please sign in to comment.