mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
Skip current_user test in Ruby18 due to pesky :id method
This commit is contained in:
parent
618768853a
commit
0b2433667c
1 changed files with 7 additions and 5 deletions
|
@ -21,11 +21,13 @@ describe "Articles" do
|
|||
let(:article) { Article.last }
|
||||
|
||||
context "`current_user` method returns a `String`" do
|
||||
it "should set that value as the `whodunnit`" do
|
||||
expect { post articles_path(valid_params) }.to change(PaperTrail::Version, :count).by(1)
|
||||
article.title.should == 'Doh'
|
||||
PaperTrail.whodunnit.should == 'foobar'
|
||||
article.versions.last.whodunnit.should == 'foobar'
|
||||
if RUBY_VERSION.to_f >= 1.9
|
||||
it "should set that value as the `whodunnit`" do
|
||||
expect { post articles_path(valid_params) }.to change(PaperTrail::Version, :count).by(1)
|
||||
article.title.should == 'Doh'
|
||||
PaperTrail.whodunnit.should == 'foobar'
|
||||
article.versions.last.whodunnit.should == 'foobar'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue