Commit bde9ef3

mo khan <mo@mokhan.ca>
2015-01-20 04:33:19
add spec to register a new account.
1 parent 53dbcce
Changed files (1)
spec/features/registrations_spec.rb
@@ -0,0 +1,19 @@
+require "rails_helper"
+
+feature "Registrations", type: :feature do
+  describe "creating a new account" do
+    it 'registers a new account' do
+      visit root_path
+      click_link "Register"
+      within "#new_user" do
+        fill_in "Username", with: 'mo'
+        fill_in "Email", with: 'mo@example.com'
+        fill_in "Password", with: 'password'
+        check "I Agree"
+        click_button "Register"
+      end
+
+      expect(current_path).to eql(dashboard_path)
+    end
+  end
+end