Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/github_import/representation/to_hash_spec.rb')
-rw-r--r--spec/lib/gitlab/github_import/representation/to_hash_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/lib/gitlab/github_import/representation/to_hash_spec.rb b/spec/lib/gitlab/github_import/representation/to_hash_spec.rb
index 739c832025c..52edffe586d 100644
--- a/spec/lib/gitlab/github_import/representation/to_hash_spec.rb
+++ b/spec/lib/gitlab/github_import/representation/to_hash_spec.rb
@@ -2,14 +2,14 @@
require 'fast_spec_helper'
-RSpec.describe Gitlab::GithubImport::Representation::ToHash do
+RSpec.describe Gitlab::GithubImport::Representation::ToHash, feature_category: :importers do
describe '#to_hash' do
let(:user) { double(:user, attributes: { login: 'alice' }) }
let(:issue) do
double(
:issue,
- attributes: { user: user, assignees: [user], number: 42 }
+ attributes: { user: user, assignees: [user], number: 42, created_at: 5.days.ago, status: :valid }
)
end
@@ -35,5 +35,13 @@ RSpec.describe Gitlab::GithubImport::Representation::ToHash do
it 'keeps values as-is if they do not respond to #to_hash' do
expect(issue_hash[:number]).to eq(42)
end
+
+ it 'converts Date value to String' do
+ expect(issue_hash[:created_at]).to be_an_instance_of(String)
+ end
+
+ it 'converts Symbol value to String' do
+ expect(issue_hash[:status]).to be_an_instance_of(String)
+ end
end
end