|
|
@ -92,9 +92,11 @@ describe ::API::V3::WorkPackages::Schema::SpecificWorkPackageSchema do |
|
|
|
.to receive(:readonly_status?) |
|
|
|
.to receive(:readonly_status?) |
|
|
|
.and_return(false) |
|
|
|
.and_return(false) |
|
|
|
|
|
|
|
|
|
|
|
is_expected.to_not be_readonly |
|
|
|
# As the writability is memoized we need to have a new schema |
|
|
|
expect(subject.writable?(:status)).to be_truthy |
|
|
|
new_schema = described_class.new(work_package: work_package) |
|
|
|
expect(subject.writable?(:subject)).to be_truthy |
|
|
|
expect(new_schema).to_not be_readonly |
|
|
|
|
|
|
|
expect(new_schema.writable?(:status)).to be_truthy |
|
|
|
|
|
|
|
expect(new_schema.writable?(:subject)).to be_truthy |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|