Commit debaa813 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Move build badge specs to badges directory

parent 28b11963
Feature: Project Builds Badge
Feature: Project Badges Build
Background:
Given I sign in as a user
And I own a project
......
class Spinach::Features::ProjectBuildsBadge < Spinach::FeatureSteps
class Spinach::Features::ProjectBadgesBuild < Spinach::FeatureSteps
include SharedAuthentication
include SharedProject
include SharedBuilds
......@@ -20,11 +20,8 @@ class Spinach::Features::ProjectBuildsBadge < Spinach::FeatureSteps
expect_badge('running')
end
def svg
Nokogiri::HTML.parse(page.body)
end
def expect_badge(status)
svg = Nokogiri::HTML.parse(page.body)
expect(page.response_headers).to include('Content-Type' => 'image/svg+xml')
expect(svg.at(%Q{text:contains("#{status}")})).to be_truthy
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment