diff options
author | Sean McGivern <sean@gitlab.com> | 2019-07-30 10:11:48 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-08-01 11:07:27 +0100 |
commit | c4a8f45f7d5f6873f912004e77af1da2f96fd831 (patch) | |
tree | a86ecd8378f188db59837badd141eef2f756e9dd /spec/features/user_opens_link_to_comment_spec.rb | |
parent | ab0a6455c790874cafd2deff9b7b2da8d82169f2 (diff) | |
download | gitlab-ce-c4a8f45f7d5f6873f912004e77af1da2f96fd831.tar.gz |
Rename broken spec files
RSpec only executes files ending in _spec.rb.
Diffstat (limited to 'spec/features/user_opens_link_to_comment_spec.rb')
-rw-r--r-- | spec/features/user_opens_link_to_comment_spec.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/features/user_opens_link_to_comment_spec.rb b/spec/features/user_opens_link_to_comment_spec.rb new file mode 100644 index 00000000000..f1e07e55799 --- /dev/null +++ b/spec/features/user_opens_link_to_comment_spec.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'User opens link to comment', :js do + let(:project) { create(:project, :public) } + let(:note) { create(:note_on_issue, project: project) } + + context 'authenticated user' do + let(:user) { create(:user) } + + before do + sign_in(user) + end + + it 'switches to all activity and does not show error message' do + create(:user_preference, user: user, issue_notes_filter: UserPreference::NOTES_FILTERS[:only_activity]) + + visit Gitlab::UrlBuilder.build(note) + + expect(page.find('#discussion-filter-dropdown')).to have_content('Show all activity') + expect(page).not_to have_content('Something went wrong while fetching comments') + end + end + + context 'anonymous user' do + it 'does not show error message' do + visit Gitlab::UrlBuilder.build(note) + + expect(page).not_to have_content('Something went wrong while fetching comments') + end + end +end |