Skip to content
Snippets Groups Projects
Commit debaa813 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Move build badge specs to badges directory

parent 28b11963
No related branches found
No related tags found
No related merge requests found
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
Loading
Loading
class Spinach::Features::ProjectBuildsBadge < Spinach::FeatureSteps class Spinach::Features::ProjectBadgesBuild < Spinach::FeatureSteps
include SharedAuthentication include SharedAuthentication
include SharedProject include SharedProject
include SharedBuilds include SharedBuilds
Loading
@@ -20,11 +20,8 @@ class Spinach::Features::ProjectBuildsBadge < Spinach::FeatureSteps
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment