Commit e0ac704a authored by John Hope's avatar John Hope

Remove database hits from Issue#moved? tests

parent 06d8df4e
......@@ -313,19 +313,16 @@ describe Issue do
end
describe '#moved?' do
let(:issue) { create(:issue) }
subject { issue.moved? }
context 'when issue has not been moved' do
subject { build_stubbed(:issue) }
context 'issue not moved' do
it { is_expected.to eq false }
it { is_expected.not_to be_moved }
end
context 'issue already moved' do
let(:moved_to_issue) { create(:issue) }
let(:issue) { create(:issue, moved_to: moved_to_issue) }
context 'when issue has already been moved' do
subject { build_stubbed(:issue, moved_to: build_stubbed(:issue)) }
it { is_expected.to eq true }
it { is_expected.to be_moved }
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment