diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2017-08-15 08:20:35 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-15 08:20:35 +0000 |
commit | d2b4109b0830970f41c60b7407366bf760d41676 (patch) | |
tree | 604c18c9049de11e36091b10801b19c0966509d1 /spec/views | |
parent | 155de419029a200a04e257baded9ea3c5f5bfe99 (diff) | |
download | gitlab-ce-d2b4109b0830970f41c60b7407366bf760d41676.tar.gz |
Display GPG status loading spinner only when Ajax request is made
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/projects/commits/_commit.html.haml_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/views/projects/commits/_commit.html.haml_spec.rb b/spec/views/projects/commits/_commit.html.haml_spec.rb new file mode 100644 index 00000000000..4c247361bd7 --- /dev/null +++ b/spec/views/projects/commits/_commit.html.haml_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe 'projects/commits/_commit.html.haml' do + context 'with a singed commit' do + let(:project) { create(:project, :repository) } + let(:repository) { project.repository } + let(:ref) { GpgHelpers::SIGNED_COMMIT_SHA } + let(:commit) { repository.commit(ref) } + + it 'does not display a loading spinner for GPG status' do + render partial: 'projects/commits/commit', locals: { + project: project, + ref: ref, + commit: commit + } + + within '.gpg-status-box' do + expect(page).not_to have_css('i.fa.fa-spinner.fa-spin') + end + end + end +end |