diff options
author | Phil Hughes <me@iamphill.com> | 2017-12-12 12:11:01 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-12-12 12:11:01 +0300 |
commit | 3032989ad4e8b93e5ad60cdbb817d1be5f9edacb (patch) | |
tree | d59157f8a57b6913bbb5ccdf6d539fda3e61b0eb /spec/features/projects/tree | |
parent | e001f4b77265fb5430bab0271a5838df388cf8ea (diff) |
added specs
Diffstat (limited to 'spec/features/projects/tree')
-rw-r--r-- | spec/features/projects/tree/tree_show_spec.rb | 28 |
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 |