comment spec: added to allow updating (to mark as read).

18 months ago

author
Alexandre "kAworu" Perrin <kaworu@kaworu.ch>
date
Tue Nov 16 13:57:40 2010 +0100
changeset 244
a92259a37051
parent 243
8b5a7c4ad592
child 245
136847f72690

comment spec: added to allow updating (to mark as read).

spec/models/comment_spec.rb file | annotate | diff | revisions
     1.1 --- a/spec/models/comment_spec.rb	Tue Nov 16 04:04:42 2010 +0100
     1.2 +++ b/spec/models/comment_spec.rb	Tue Nov 16 13:57:40 2010 +0100
     1.3 @@ -26,11 +26,14 @@
     1.4      @comment.errors.on(:email).should == expected
     1.5    end
     1.6  
     1.7 -  it 'should not allow update' do
     1.8 +  it 'should FAIL_TO disallow update' do
     1.9        @comment.body = '42'
    1.10        @comment.should be_valid
    1.11        @comment.save.should be_false
    1.12    end
    1.13 +  it 'should allow update in order to mark as read' do
    1.14 +      @comment.update_attribute(:read, true).should be_true
    1.15 +  end
    1.16  
    1.17    context 'with some entry in the database' do
    1.18      before :each do

mercurial