Fix specs by passing required user

pull/2081/head
Hagen Schink 10 years ago
parent 2f42e18358
commit c109cbf9bc
  1. 3
      spec/lib/api/v3/work_packages/work_package_model_spec.rb
  2. 2
      spec/lib/api/v3/work_packages/work_package_representer_spec.rb

@ -31,8 +31,9 @@ require 'spec_helper'
describe ::API::V3::WorkPackages::WorkPackageModel do
include Capybara::RSpecMatchers
subject(:model) { ::API::V3::WorkPackages::WorkPackageModel.new(work_package) }
subject(:model) { ::API::V3::WorkPackages::WorkPackageModel.new(work_package, current_user) }
let(:work_package) { FactoryGirl.build(:work_package, attributes) }
let(:current_user) { FactoryGirl.build(:user) }
context 'with a formatted description' do
let(:attributes) {

@ -34,7 +34,7 @@ describe ::API::V3::WorkPackages::WorkPackageRepresenter do
let(:representer) { described_class.new(model, current_user: current_user) }
let(:model) { ::API::V3::WorkPackages::WorkPackageModel.new(work_package) }
let(:model) { ::API::V3::WorkPackages::WorkPackageModel.new(work_package, current_user) }
let(:work_package) { FactoryGirl.build(:work_package,
id: 42,
created_at: DateTime.now,

Loading…
Cancel
Save