Move build badge specs to badges directory
This commit is contained in:
parent
28b11963b1
commit
debaa81329
|
@ -1,4 +1,4 @@
|
|||
Feature: Project Builds Badge
|
||||
Feature: Project Badges Build
|
||||
Background:
|
||||
Given I sign in as a user
|
||||
And I own a project
|
|
@ -1,4 +1,4 @@
|
|||
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
|
Loading…
Reference in New Issue