nay-record_with_operator 0.0.6 → 0.0.7
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.
- data/Rakefile +1 -1
- data/lib/record_with_operator.rb +1 -1
- data/test/record_with_operator_test.rb +7 -0
- metadata +1 -1
    
        data/Rakefile
    CHANGED
    
    | @@ -12,7 +12,7 @@ DESCRIPTION = "Rails plugin to set created_by, updated_by, deleted_by to ActiveR | |
| 12 12 | 
             
            GITHUB_PROJECT = "record_with_operator"
         | 
| 13 13 | 
             
            HOMEPAGE = "http://github.com/nay/#{GITHUB_PROJECT}/tree"
         | 
| 14 14 | 
             
            BIN_FILES = %w( )
         | 
| 15 | 
            -
            VER = "0.0. | 
| 15 | 
            +
            VER = "0.0.7"
         | 
| 16 16 | 
             
            CLEAN.include ['pkg']
         | 
| 17 17 |  | 
| 18 18 | 
             
            desc 'Default: run unit tests.'
         | 
    
        data/lib/record_with_operator.rb
    CHANGED
    
    
| @@ -167,6 +167,13 @@ class RecordWithOperatorTest < ActiveSupport::TestCase | |
| 167 167 | 
             
                assert_equal @user2, memo.operator
         | 
| 168 168 | 
             
              end
         | 
| 169 169 |  | 
| 170 | 
            +
              def test_builded_memo_should_have_own_set_operator
         | 
| 171 | 
            +
                note = NoteWithUser.find(@note_created_by_user1.id)
         | 
| 172 | 
            +
                memo = note.memos.build(:body => "memo", :operator => @user2)
         | 
| 173 | 
            +
                assert_equal @user2, memo.operator
         | 
| 174 | 
            +
              end
         | 
| 175 | 
            +
             | 
| 176 | 
            +
             | 
| 170 177 | 
             
              def test_created_memo_should_have_operator_and_created_by
         | 
| 171 178 | 
             
                note = NoteWithUser.find(@note_created_by_user1.id, :for => @user2)
         | 
| 172 179 | 
             
                memo = note.memos.create(:body => "memo")
         |