Skip to content

Commit

Permalink
Merge pull request #47 from hugodias/dev
Browse files Browse the repository at this point in the history
BDD tests to cover create job feature and added semaphore integration
  • Loading branch information
hugodias committed Apr 30, 2016
2 parents a107958 + f8336de commit 3ed0dc9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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

Expand Down
Empty file.
29 changes: 29 additions & 0 deletions 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

0 comments on commit 3ed0dc9

Please sign in to comment.