diff options
Diffstat (limited to 'spec/lib/bitbucket_server/representation/pull_request_spec.rb')
-rw-r--r-- | spec/lib/bitbucket_server/representation/pull_request_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/bitbucket_server/representation/pull_request_spec.rb b/spec/lib/bitbucket_server/representation/pull_request_spec.rb index 4d8bb3a4407..2d67dd88b24 100644 --- a/spec/lib/bitbucket_server/representation/pull_request_spec.rb +++ b/spec/lib/bitbucket_server/representation/pull_request_spec.rb @@ -82,6 +82,18 @@ RSpec.describe BitbucketServer::Representation::PullRequest, feature_category: : it { expect(subject.merged?).to be_truthy } end + describe '#closed?' do + it { expect(subject.closed?).to be_falsey } + + context 'for declined pull requests' do + before do + sample_data['state'] = 'DECLINED' + end + + it { expect(subject.closed?).to be_truthy } + end + end + describe '#created_at' do it { expect(subject.created_at.to_i).to eq(sample_data['createdDate'] / 1000) } end |