Sha256: 4032ba0f8be82a66d16028a0a63f943cc70e5bbdbf055b2d72892078fd77b4cb

Contents?: true

Size: 694 Bytes

Versions: 1

Compression:

Stored size: 694 Bytes

Contents

require 'spec_helper'

module Tasuku
  describe Concerns::Author do
    let!(:user)         { create :user }
    let!(:article)      { create :article }
    let!(:task)         { create :task }
    let!(:verification) { create :verification, task: task, verifiable: article }
    let!(:confirmation) { create :verification_confirmation, author: user, verification: verification }
    let!(:response)     { Taskables::Taskable::Response.find_by author: user, submittable: confirmation }

    describe 'dependencies' do
      before { user.destroy }

      it 'destroys its responses' do
        expect { response.reload }.to raise_error(ActiveRecord::RecordNotFound)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tasuku-1.1.0 spec/lib/tasuku/concerns/author_spec.rb