Changeset 5947 for platform/tdiary/spec

Show
Ignore:
Timestamp:
01/31/08 14:47:52 (10 months ago)
Author:
kakutani
Message:

platform/tdiary/spec/openid_spec.rb: Yahoo! supports only openid2.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/tdiary/spec/openid_spec.rb

    r5932 r5947  
    207207                                :rel => 'openid2.local_id', 
    208208                                :href => 'https://me.yahoo.co.jp/a/tdtds')} 
     209 
     210                it { @header_snippet.should_not include_link_tag_with( 
     211                                :rel => "openid.server")} 
     212 
     213                it { @header_snippet.should_not include_link_tag_with( 
     214                                :rel => "openid.delegate")} 
     215 
    209216        end 
    210217 
     
    222229                                :rel => 'openid2.local_id', 
    223230                                :href => 'https://me.yahoo.com/a/tdtds')} 
     231 
     232                it { @header_snippet.should_not include_link_tag_with( 
     233                                :rel => "openid.server")} 
     234 
     235                it { @header_snippet.should_not include_link_tag_with( 
     236                                :rel => "openid.delegate")} 
    224237        end 
    225238 
    226239        def include_link_tag_with(options) 
    227240                msg = "include #{options[:rel]} link tag" 
    228                 expected = %|<link rel="#{options[:rel]}" href="#{options[:href]}">| 
     241                expected = %|<link rel="#{options[:rel]}"| if options[:rel] 
     242                expected <<= %| href="#{options[:href]}">| if options[:href] 
    229243                        Spec::Matchers::SimpleMatcher.new(msg) do |actual| 
    230                         actual.include?(expected) 
     244                        actual.include? expected 
    231245                end 
    232246        end 
     
    238252      EOS 
    239253                Spec::Matchers::SimpleMatcher.new(msg) do |actual| 
    240                                 actual.include?(expected) 
     254                                actual.include?( expected ) 
    241255                end 
    242256        end