From 689a8d721474bc79bcd43838346a89a7112c95cd Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Sat, 30 Apr 2016 13:46:31 -0300 Subject: [PATCH 1/3] BDD tests to cover create job feature --- spec/features/jobs/job_new_spec.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/spec/features/jobs/job_new_spec.rb b/spec/features/jobs/job_new_spec.rb index e69de29..424ac96 100644 --- a/spec/features/jobs/job_new_spec.rb +++ b/spec/features/jobs/job_new_spec.rb @@ -0,0 +1,29 @@ +# Feature: Create a new job +# As a visitor +# I want to create a new job +# So other people can see it +feature 'Create a new job', :devise do + + # Scenario: Visitor can create a job + # Given I am a visitor + # When I visit a new job + # I fill all the required information + # And I submit + # Then I see the success message + scenario 'visitor can create a job' do + company = FactoryGirl.create(:company) + job_type = FactoryGirl.create(:job_type) + category = FactoryGirl.create(:category) + + visit new_job_path + select company.title, :from => 'job[company_id]' + fill_in 'Seu nome', with: Faker::Name.first_name + fill_in 'Seu e-mail', with: Faker::Internet.email + find('.goto_step3').click + fill_in 'Titulo da vaga', with: Faker::Name.name + choose category.title + choose job_type.title + click_button 'Publicar' + expect(page).to have_content 'a vaga foi salva com sucesso' + end +end From 4a064d4e0263646e446e11b03597272338815924 Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Sat, 30 Apr 2016 13:48:37 -0300 Subject: [PATCH 2/3] Job index tests is handled by home_page_spec file --- spec/features/jobs/job_index_spec.rb | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 spec/features/jobs/job_index_spec.rb diff --git a/spec/features/jobs/job_index_spec.rb b/spec/features/jobs/job_index_spec.rb deleted file mode 100644 index e69de29..0000000 From f8336deb7c7712fc34e20835e5b0646dd5fd3127 Mon Sep 17 00:00:00 2001 From: Hugo Dias Date: Sat, 30 Apr 2016 14:05:33 -0300 Subject: [PATCH 3/3] Integrated semaphore with both branches --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1119fb0..f8110b2 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Este é o repositório do novo Job Board de [San Pedro Valley](http://jobs.sanpe Veja funcionando em [sanpedrovalleyjobs.herokuapp.com](https://sanpedrovalleyjobs.herokuapp.com) -[![Join the chat at https://gitter.im/hugodias/san-pedro-valley-jobs](https://badges.gitter.im/hugodias/san-pedro-valley-jobs.svg)](https://gitter.im/hugodias/san-pedro-valley-jobs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build Status](https://semaphoreci.com/api/v1/hugodias/san-pedro-valley-jobs/branches/master/badge.svg)](https://semaphoreci.com/hugodias/san-pedro-valley-jobs) [![Join the chat at https://gitter.im/hugodias/san-pedro-valley-jobs](https://badges.gitter.im/hugodias/san-pedro-valley-jobs.svg)](https://gitter.im/hugodias/san-pedro-valley-jobs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ## Requerimentos