Created
January 23, 2018 10:00
-
-
Save salami-art/7a90a905aa43d2cc9728ef54a86c22d6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'rails_helper' | |
RSpec.describe RegistrationController do | |
include Devise::Test::ControllerHelpers | |
describe 'POST /users for user' do | |
let(:user) { | |
{ | |
email: "[email protected]", | |
password: "master-tester", | |
user_profile_attributes: { | |
name: "Tester Name", | |
last_name: "Tester Surname", | |
bitrh_date: 21.years.ago, | |
city_id: 1, | |
sex: 'M', | |
phone: 123456789 | |
} | |
}.as_json | |
} | |
before(:each) do | |
@request.env["devise.mapping"] = Devise.mappings[:user] | |
end | |
it_behaves_like 'check delivery', :create, { :user => { | |
email: "[email protected]", | |
password: "master-tester", | |
user_profile_attributes: { | |
name: "Tester Name", | |
last_name: "Tester Surname", | |
bitrh_date: 21.years.ago, | |
city_id: 1, | |
sex: 'M', | |
phone: 123456789 | |
} | |
}.as_json}, "[email protected]" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment