Skip to content

Commit

Permalink
Unit test coverage for Comment#requires_openid_authentication?
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviershay committed Mar 25, 2011
1 parent 9a482af commit 6fc53da
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/models/comment_spec.rb
Expand Up @@ -165,3 +165,17 @@ def set_comment_attributes(comment, extra = {})
@comment.author.should == "Your OpenID Name"
end
end

describe Comment, '#requires_openid_authentication?' do
describe 'with an author containing a .' do
subject { Comment.new(:author => 'example.com').requires_openid_authentication? }

it { should be }
end

describe 'with a normal author' do
subject { Comment.new(:author => 'Don Alias').requires_openid_authentication? }

it { should_not be }
end
end

0 comments on commit 6fc53da

Please sign in to comment.