diff --git a/spec/factories/ci/pipelines.rb b/spec/factories/ci/pipelines.rb
index 6ed4f547d046485ffa27bf63f921636ce6cbcb02..77404f46c92fe2ec1e460aacf887ee661d505b1e 100644
--- a/spec/factories/ci/pipelines.rb
+++ b/spec/factories/ci/pipelines.rb
@@ -36,6 +36,10 @@ FactoryGirl.define do
         #
         pipeline.config_processor if evaluator.config
       end
+
+      trait :invalid do
+        config(rspec: nil)
+      end
     end
   end
 end
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb
index 574efe351f5d8495c8bf19e87713d5a901764f35..cfc74c140ddd403322192590f5b9ef2ec790e4f8 100644
--- a/spec/features/projects/pipelines/pipelines_spec.rb
+++ b/spec/features/projects/pipelines/pipelines_spec.rb
@@ -86,6 +86,24 @@ describe 'Pipelines', :feature, :js do
         end
       end
 
+      context 'when pipeline has configuration errors' do
+        let(:pipeline) do
+          create(:ci_pipeline, :invalid, project: project)
+        end
+
+        before { visit_project_pipelines }
+
+        it 'contains badge that indicate errors' do
+          expect(page).to have_content 'yaml invalid'
+        end
+
+        it 'contains badge with tooltip which contains error' do
+          expect(pipeline).to have_yaml_errors
+          expect(page).to have_selector(
+            %Q{span[data-original-title="#{pipeline.yaml_errors}"]})
+        end
+      end
+
       context 'with manual actions' do
         let!(:manual) do
           create(:ci_build, :manual,