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:
authorPhil Hughes <me@iamphill.com>2017-12-12 12:11:01 +0300
committerPhil Hughes <me@iamphill.com>2017-12-12 12:11:01 +0300
commit3032989ad4e8b93e5ad60cdbb817d1be5f9edacb (patch)
treed59157f8a57b6913bbb5ccdf6d539fda3e61b0eb /spec/features/projects/tree
parente001f4b77265fb5430bab0271a5838df388cf8ea (diff)
added specs
Diffstat (limited to 'spec/features/projects/tree')
-rw-r--r--spec/features/projects/tree/tree_show_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/features/projects/tree/tree_show_spec.rb b/spec/features/projects/tree/tree_show_spec.rb
new file mode 100644
index 00000000000..c8a17871508
--- /dev/null
+++ b/spec/features/projects/tree/tree_show_spec.rb
@@ -0,0 +1,28 @@
+require 'spec_helper'
+
+feature 'Projects tree' do
+ let(:user) { create(:user) }
+ let(:project) { create(:project, :repository) }
+
+ before do
+ project.add_master(user)
+ sign_in(user)
+
+ visit project_tree_path(project, 'master')
+ end
+
+ it 'renders tree table' do
+ expect(page).to have_selector('.tree-item')
+ expect(page).not_to have_selector('.label-lfs', text: 'LFS')
+ end
+
+ context 'LFS' do
+ before do
+ visit project_tree_path(project, File.join('master', 'files/lfs'))
+ end
+
+ it 'renders LFS badge on blob item' do
+ expect(page).to have_selector('.label-lfs', text: 'LFS')
+ end
+ end
+end