Created
September 2, 2015 12:39
-
-
Save alexshapalov/15ebe1931d88081d576b to your computer and use it in GitHub Desktop.
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
RSpec.describe 'Authenticated admin can write meta tags', type: :feature, js: true do | |
let!(:user) { create :user, :admin, email: '[email protected]' } | |
let!(:city) { create :city, name: 'loddgy' } | |
let!(:property) { create :property } | |
describe 'Authenticated adnin' do | |
specify 'Admin Can create new post' do | |
visit '/home' | |
find('.top-bar-section').click_on 'Sign In' | |
find('.signin').fill_in 'Email', with: '[email protected]' | |
find('.passin').fill_in 'Password', with: '12345678' | |
find('.button.expand.tiny.login').click | |
expect(current_path).to eq '/home' | |
visit '/admin/cities/loddgy/properties/new' | |
fill_in 'Address *', with: 'Test address' | |
select 'Hostel' | |
fill_in 'Price *', with: property.price | |
select 'Flexible' | |
fill_in 'Contact Name *', with: property.contact_name | |
fill_in 'Email Manager *', with: property.email | |
fill_in 'Phone Number *', with: property.phone | |
fill_in 'Title', with: 'Test title' | |
fill_in 'Description', with: 'Test description' | |
fill_in 'Keywords', with: 'Test keywords' | |
click_on 'Continue' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment