summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-04-17 23:52:34 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-04-18 17:14:59 -0300
commit05a4f444c368593216ab335db93ca98ce2218e94 (patch)
treeb6018ea6ad4be802031882746b45a19a80a63d1b /spec/lib/gitlab
parent5f39729c19fa22836686dab32fbcf7c34f32fd41 (diff)
downloadgitlab-ce-05a4f444c368593216ab335db93ca98ce2218e94.tar.gz
Import labels from GitHub
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/github_import/label_formatter_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/lib/gitlab/github_import/label_formatter_spec.rb b/spec/lib/gitlab/github_import/label_formatter_spec.rb
new file mode 100644
index 00000000000..e94440a7fb0
--- /dev/null
+++ b/spec/lib/gitlab/github_import/label_formatter_spec.rb
@@ -0,0 +1,19 @@
+require 'spec_helper'
+
+describe Gitlab::GithubImport::LabelFormatter, lib: true do
+
+ describe '#attributes' do
+ it 'returns formatted attributes' do
+ project = create(:project)
+ raw = double(name: 'improvements', color: 'e6e6e6')
+
+ formatter = described_class.new(project, raw)
+
+ expect(formatter.attributes).to eq({
+ project: project,
+ title: 'improvements',
+ color: '#e6e6e6'
+ })
+ end
+ end
+end