Move build badge specs to badges directory
This commit is contained in:
parent
28b11963b1
commit
debaa81329
2 changed files with 3 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
Feature: Project Builds Badge
|
Feature: Project Badges Build
|
||||||
Background:
|
Background:
|
||||||
Given I sign in as a user
|
Given I sign in as a user
|
||||||
And I own a project
|
And I own a project
|
|
@ -1,4 +1,4 @@
|
||||||
class Spinach::Features::ProjectBuildsBadge < Spinach::FeatureSteps
|
class Spinach::Features::ProjectBadgesBuild < Spinach::FeatureSteps
|
||||||
include SharedAuthentication
|
include SharedAuthentication
|
||||||
include SharedProject
|
include SharedProject
|
||||||
include SharedBuilds
|
include SharedBuilds
|
||||||
|
@ -20,11 +20,8 @@ class Spinach::Features::ProjectBuildsBadge < Spinach::FeatureSteps
|
||||||
expect_badge('running')
|
expect_badge('running')
|
||||||
end
|
end
|
||||||
|
|
||||||
def svg
|
|
||||||
Nokogiri::HTML.parse(page.body)
|
|
||||||
end
|
|
||||||
|
|
||||||
def expect_badge(status)
|
def expect_badge(status)
|
||||||
|
svg = Nokogiri::HTML.parse(page.body)
|
||||||
expect(page.response_headers).to include('Content-Type' => 'image/svg+xml')
|
expect(page.response_headers).to include('Content-Type' => 'image/svg+xml')
|
||||||
expect(svg.at(%Q{text:contains("#{status}")})).to be_truthy
|
expect(svg.at(%Q{text:contains("#{status}")})).to be_truthy
|
||||||
end
|
end
|
Loading…
Reference in a new issue