simple_audit_trail 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,12 +8,12 @@ describe SimpleAuditTrail::Auditor do
8
8
  describe "audited model" do
9
9
  it "can call #audit" do
10
10
  expect {
11
- Tina.create(:badonkadonks => 2, :ladies => 1)
11
+ Tina.create(:badonkadonks => 2, :ladies => 1, :audited_user_id => 123)
12
12
  }.to_not raise_error
13
13
  end
14
14
 
15
15
  it "has an audited_fields attribute" do
16
- t = Tina.create(:badonkadonks => 2, :ladies => 1)
16
+ t = Tina.create(:badonkadonks => 2, :ladies => 1, :audited_user_id => 123)
17
17
 
18
18
  expect(t.audited_fields).to match_array(["badonkadonks", "ladies"])
19
19
  end
@@ -22,7 +22,8 @@ describe SimpleAuditTrail::Auditor do
22
22
  before do
23
23
  @tina = Tina.create(
24
24
  :badonkadonks => 0,
25
- :ladies => 0
25
+ :ladies => 0,
26
+ :audited_user_id => 123
26
27
  )
27
28
  @tina.reload
28
29
  end
@@ -106,7 +107,7 @@ describe SimpleAuditTrail::Auditor do
106
107
  end
107
108
 
108
109
  it "does not raise an Exception even if no auditor is set" do
109
- expect(@tina.audited_user_id).to be_blank
110
+ @tina.audited_user_id = nil
110
111
  expect { @tina.save }.to_not raise_error
111
112
  end
112
113
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_audit_trail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Maujean
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-29 00:00:00.000000000 Z
11
+ date: 2017-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  version: '0'
201
201
  requirements: []
202
202
  rubyforge_project:
203
- rubygems_version: 2.2.2
203
+ rubygems_version: 2.4.8
204
204
  signing_key:
205
205
  specification_version: 4
206
206
  summary: a simple audit trail plugin for active record models