From c6592045c482d9086d5db6ebab87db49aa85cefa Mon Sep 17 00:00:00 2001 From: Shaun McDonald Date: Sat, 8 Nov 2008 11:34:58 +0000 Subject: [PATCH] Adding some diary fixtures and test stubs --- test/fixtures/diary_comments.yml | 7 ++++ test/fixtures/diary_entries.yml | 21 ++++++++++++ .../functional/diary_entry_controller_test.rb | 33 +++++++++++++++++-- 3 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 test/fixtures/diary_comments.yml create mode 100644 test/fixtures/diary_entries.yml diff --git a/test/fixtures/diary_comments.yml b/test/fixtures/diary_comments.yml new file mode 100644 index 000000000..8bb9f49bd --- /dev/null +++ b/test/fixtures/diary_comments.yml @@ -0,0 +1,7 @@ +comment_for_geo_post: + id: 1 + diary_entry_id: 2 + user_id: 2 + body: Some comment text + created_at: "2008-11-08 09:45:34" + updated_at: "2008-11-08 10:34:34" diff --git a/test/fixtures/diary_entries.yml b/test/fixtures/diary_entries.yml new file mode 100644 index 000000000..5d07e5fa7 --- /dev/null +++ b/test/fixtures/diary_entries.yml @@ -0,0 +1,21 @@ +normal_user_entry_1: + id: 1 + user_id: 1 + title: Diary Entry 1 + body: This is the body of diary entry 1. + created_at: "2008-11-07 17:43:34" + updated_at: "2008-11-07 17:43:34" + latitude: + longitude: + language: + +normal_user_geo_entry: + id: 2 + user_id: 1 + title: Geo Entry 1 + body: This is the body of a geo diary entry in London. + created_at: "2008-11-07 17:47:34" + updated_at: "2008-11-07 17:47:34" + latitude: 51.50763 + longitude: -0.10781 + language: diff --git a/test/functional/diary_entry_controller_test.rb b/test/functional/diary_entry_controller_test.rb index 7ebf439f4..7eebfa57e 100644 --- a/test/functional/diary_entry_controller_test.rb +++ b/test/functional/diary_entry_controller_test.rb @@ -1,8 +1,35 @@ require File.dirname(__FILE__) + '/../test_helper' class DiaryEntryControllerTest < ActionController::TestCase - # Replace this with your real tests. - def test_truth - assert true + def basic_authorization(user, pass) + @request.env["HTTP_AUTHORIZATION"] = "Basic %s" % Base64.encode64("#{user}:#{pass}") + end + + def content(c) + @request.env["RAW_POST_DATA"] = c.to_s + end + + def test_showing_create_diary_entry + + end + + def test_editing_diary_entry + + end + + def test_editing_creating_diary_comment + + end + + def test_listing_diary_entries + + end + + def test_rss + + end + + def test_viewing_diary_entry + end end -- 2.43.2