diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-27 07:55:23 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-27 07:55:23 +0300 |
commit | 079b490ad2106e83bf315c7f3e9ac5e1d60c0d0c (patch) | |
tree | 40475050deb720b2fe85d6fac49fb40a9865698a | |
parent | 02ceea7be8b035b3dc5bdbce40779f3c8c3dc947 (diff) |
Fix failing specs
-rw-r--r-- | spec/controllers/import/bitbucket_server_controller_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/bitbucket_server/representation/pull_request_spec.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/import/bitbucket_server_controller_spec.rb b/spec/controllers/import/bitbucket_server_controller_spec.rb index 3eac6fdced5..8d0034b2cc2 100644 --- a/spec/controllers/import/bitbucket_server_controller_spec.rb +++ b/spec/controllers/import/bitbucket_server_controller_spec.rb @@ -119,8 +119,8 @@ describe Import::BitbucketServerController do before do allow(controller).to receive(:bitbucket_client).and_return(client) - @repo = double(slug: 'vim', owner: 'asd', full_name: 'asd/vim', "valid?" => true, project_name: 'asd', browse_url: 'http://test', name: 'vim') - @invalid_repo = double(slug: 'invalid', owner: 'foobar', full_name: 'asd/foobar', "valid?" => false, browse_url: 'http://bad-repo') + @repo = double(slug: 'vim', project_key: 'asd', full_name: 'asd/vim', "valid?" => true, project_name: 'asd', browse_url: 'http://test', name: 'vim') + @invalid_repo = double(slug: 'invalid', project_key: 'foobar', full_name: 'asd/foobar', "valid?" => false, browse_url: 'http://bad-repo') assign_session_tokens end diff --git a/spec/lib/bitbucket_server/representation/pull_request_spec.rb b/spec/lib/bitbucket_server/representation/pull_request_spec.rb index b84bb34dc9f..4b8afdb006b 100644 --- a/spec/lib/bitbucket_server/representation/pull_request_spec.rb +++ b/spec/lib/bitbucket_server/representation/pull_request_spec.rb @@ -50,11 +50,11 @@ describe BitbucketServer::Representation::PullRequest do end describe '#created_at' do - it { expect(subject.created_at).to eq(Time.parse('2018-07-02 23:50:35')) } + it { expect(subject.created_at.to_i).to eq(sample_data['createdDate'] / 1000) } end describe '#updated_at' do - it { expect(subject.updated_at).to eq(Time.parse('2018-07-02 23:50:48')) } + it { expect(subject.updated_at.to_i).to eq(sample_data['updatedDate'] / 1000) } end describe '#title' do |