master
1require "rails_helper"
2
3describe "Change settings", js: true do
4 let(:user) { create(:user, password: "password") }
5
6 before { http_login(user) }
7
8 it "saves the changes properly" do
9 visit my_settings_path
10 within(".form-horizontal") do
11 fill_in('user_city', with: "Calgary, Alberta, Canada")
12 fill_in('user_website', with: "https://www.cakeside.com/")
13 fill_in('user_twitter', with: "cakeside")
14 fill_in('user_facebook', with: "cakeside")
15 end
16 click_button "Save changes"
17 expect(page).to have_content(I18n.translate(:profile_saved))
18 end
19end