Changeset 5487 for platform/tdiary/spec
- Timestamp:
- 01/25/08 14:04:56 (10 months ago)
- Files:
-
- 1 modified
-
platform/tdiary/spec/twitter_js_spec.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
platform/tdiary/spec/twitter_js_spec.rb
r5435 r5487 4 4 5 5 describe "twitter_js plugin" do 6 def setup_twitter_js_plugin(mode )6 def setup_twitter_js_plugin(mode, user_id) 7 7 fake_plugin(:twitter_js) { |plugin| 8 8 plugin.mode = mode 9 plugin.conf['twitter.user'] = "123456789"9 plugin.conf['twitter.user'] = user_id 10 10 plugin.date = Time.parse("20080124") 11 11 } 12 12 end 13 13 14 describe "should render in day" do14 describe "should render javascript and div tag in day" do 15 15 before do 16 @plugin = setup_twitter_js_plugin("day" )16 @plugin = setup_twitter_js_plugin("day", "123456789") 17 17 end 18 18 … … 28 28 end 29 29 30 describe "should render in latest" do30 describe "should render javascript and div tag in latest" do 31 31 before do 32 @plugin = setup_twitter_js_plugin("latest" )32 @plugin = setup_twitter_js_plugin("latest", "123456789") 33 33 end 34 34 … … 44 44 end 45 45 46 describe "should render in edit" do46 describe "should not render in edit" do 47 47 before do 48 @plugin = setup_twitter_js_plugin("edit" )48 @plugin = setup_twitter_js_plugin("edit", "123456789") 49 49 end 50 50 … … 56 56 it "for body leave" do 57 57 snippet = @plugin.body_leave_proc(Time.parse("20080124")) 58 snippet.should be_empty 59 end 60 end 61 62 describe "should not render when user_id is empty" do 63 before do 64 @plugin = setup_twitter_js_plugin("edit", "") 65 end 66 67 it "for header" do 68 snippet = @plugin.header_proc 69 snippet.should be_empty 70 end 71 72 it "for body leave" do 73 snippet = @plugin.body_leave_proc(Time.parse("")) 58 74 snippet.should be_empty 59 75 end
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)