Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from hugodias/dev
BDD tests to cover create job feature and added semaphore integration
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |