debian-mirror-gitlab/spec/features/explore/topics_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
758 B
Ruby
Raw Permalink Normal View History

2021-12-11 22:18:48 +05:30
# frozen_string_literal: true
require 'spec_helper'
2023-04-23 21:23:45 +05:30
RSpec.describe 'Explore Topics', feature_category: :user_profile do
2021-12-11 22:18:48 +05:30
context 'when no topics exist' do
it 'renders empty message', :aggregate_failures do
visit topics_explore_projects_path
2022-05-07 20:08:51 +05:30
expect(page).to have_current_path topics_explore_projects_path, ignore_query: true
2021-12-11 22:18:48 +05:30
expect(page).to have_content('There are no topics to show.')
end
end
context 'when topics exist' do
2022-07-16 23:28:13 +05:30
let!(:topic) { create(:topic, name: 'topic1', title: 'Topic 1') }
2021-12-11 22:18:48 +05:30
it 'renders topic list' do
visit topics_explore_projects_path
2022-05-07 20:08:51 +05:30
expect(page).to have_current_path topics_explore_projects_path, ignore_query: true
2022-07-16 23:28:13 +05:30
expect(page).to have_content(topic.title)
2021-12-11 22:18:48 +05:30
end
end
end