diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/runners.rb | 2 | ||||
-rw-r--r-- | spec/features/runners_spec.rb | 17 | ||||
-rw-r--r-- | spec/requests/api/builds_spec.rb | 3 |
3 files changed, 21 insertions, 1 deletions
diff --git a/spec/factories/runners.rb b/spec/factories/runners.rb index 32af2ce..72d3e3d 100644 --- a/spec/factories/runners.rb +++ b/spec/factories/runners.rb @@ -20,6 +20,8 @@ FactoryGirl.define do "My runner#{n}" end + platform "darwin" + factory :shared_runner do is_shared true end diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb index 36b7fab..c312f83 100644 --- a/spec/features/runners_spec.rb +++ b/spec/features/runners_spec.rb @@ -72,4 +72,21 @@ describe "Runners" do @project.reload.shared_runners_enabled.should be_true end end + + describe "show page" do + before do + @project = FactoryGirl.create :project + stub_js_gitlab_calls + @specific_runner = FactoryGirl.create :specific_runner + @project.runners << @specific_runner + end + + it "shows runner information" do + visit project_runners_path(@project) + + click_on @specific_runner.short_sha + + page.should have_content(@specific_runner.platform) + end + end end diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index f69aac8..2960388 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -20,10 +20,11 @@ describe API::API do job = FactoryGirl.create :job, project: project build = commit.create_builds.first - post api("/builds/register"), token: runner.token + post api("/builds/register"), token: runner.token, info: {platform: :darwin} response.status.should == 201 json_response['sha'].should == build.sha + runner.reload.platform.should == "darwin" end it "should return 404 error if no pending build found" do |