Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
close #438; PaperTrail::Model::ClassMethods#paper_trail_enabled_for_m…
…odel? should return false if has_paper_trail isn't declared on the class in question
- Loading branch information
Showing
6 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'rails_helper' | ||
|
||
describe Fluxor, :type => :model do | ||
describe '`be_versioned` matcher' do | ||
it { is_expected.to_not be_versioned } | ||
end | ||
|
||
describe "Methods" do | ||
describe "Class" do | ||
subject { Fluxor } | ||
|
||
describe "#paper_trail_enabled_for_model?" do | ||
it { is_expected.to respond_to(:paper_trail_enabled_for_model?) } | ||
|
||
it { expect(subject.paper_trail_enabled_for_model?).to be false } | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
class Post < ActiveRecord::Base | ||
has_paper_trail :class_name => "PostVersion" | ||
|
||
end |