summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-02-17 11:34:09 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-02-17 11:34:09 +0000
commitaa792b91bbddeeb61ce77f9525fcaf238a9ad331 (patch)
treeaf0eb491f8bb405955255ab632d15860d6a14906 /spec/lib/gitlab
parent5d8f5328baca93b9134f10ae593e71834578a9f8 (diff)
parent7203826b54bb3944736057436fe8a13011801ecf (diff)
downloadgitlab-ce-aa792b91bbddeeb61ce77f9525fcaf238a9ad331.tar.gz
Merge branch '26200-convert-sidebar-to-dropdown' into 'master'
Resolve "Update global sidebar to dropdown" Closes #26200 See merge request !9199
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/themes_spec.rb48
1 files changed, 0 insertions, 48 deletions
diff --git a/spec/lib/gitlab/themes_spec.rb b/spec/lib/gitlab/themes_spec.rb
deleted file mode 100644
index 7a140518dd2..00000000000
--- a/spec/lib/gitlab/themes_spec.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-require 'spec_helper'
-
-describe Gitlab::Themes, lib: true do
- describe '.body_classes' do
- it 'returns a space-separated list of class names' do
- css = described_class.body_classes
-
- expect(css).to include('ui_graphite')
- expect(css).to include(' ui_charcoal ')
- expect(css).to include(' ui_blue')
- end
- end
-
- describe '.by_id' do
- it 'returns a Theme by its ID' do
- expect(described_class.by_id(1).name).to eq 'Graphite'
- expect(described_class.by_id(6).name).to eq 'Blue'
- end
- end
-
- describe '.default' do
- it 'returns the default application theme' do
- allow(described_class).to receive(:default_id).and_return(2)
- expect(described_class.default.id).to eq 2
- end
-
- it 'prevents an infinite loop when configuration default is invalid' do
- default = described_class::APPLICATION_DEFAULT
- themes = described_class::THEMES
-
- config = double(default_theme: 0).as_null_object
- allow(Gitlab).to receive(:config).and_return(config)
- expect(described_class.default.id).to eq default
-
- config = double(default_theme: themes.size + 5).as_null_object
- allow(Gitlab).to receive(:config).and_return(config)
- expect(described_class.default.id).to eq default
- end
- end
-
- describe '.each' do
- it 'passes the block to the THEMES Array' do
- ids = []
- described_class.each { |theme| ids << theme.id }
- expect(ids).not_to be_empty
- end
- end
-end