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

26 lines
704 B
Ruby
Raw Normal View History

2021-12-11 22:18:48 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'Explore Topics' do
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
let!(:topic) { create(:topic, name: 'topic1') }
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
2021-12-11 22:18:48 +05:30
expect(page).to have_content('topic1')
end
end
end