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 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 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