about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-12 20:47:22 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-12 20:47:22 +0100
commit34413615683677e26213263fb98f63b5aab64872 (patch)
tree7e682e8709ecfd5347316ea39240789548795606 /spec
parent1aa477ac2f0e9195497899691bb5cc16a7034c01 (diff)
Adding simple_form, adding profile settings, header image
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/settings_controller_spec.rb16
-rw-r--r--spec/fabricators/user_fabricator.rb5
-rw-r--r--spec/helpers/settings_helper_spec.rb15
3 files changed, 36 insertions, 0 deletions
diff --git a/spec/controllers/settings_controller_spec.rb b/spec/controllers/settings_controller_spec.rb
new file mode 100644
index 000000000..b417cbdaf
--- /dev/null
+++ b/spec/controllers/settings_controller_spec.rb
@@ -0,0 +1,16 @@
+require 'rails_helper'
+
+RSpec.describe SettingsController, type: :controller do
+
+  before do
+    sign_in :user, Fabricate(:user)
+  end
+
+  describe "GET #show" do
+    it "returns http success" do
+      get :show
+      expect(response).to have_http_status(:success)
+    end
+  end
+
+end
diff --git a/spec/fabricators/user_fabricator.rb b/spec/fabricators/user_fabricator.rb
new file mode 100644
index 000000000..87d86b428
--- /dev/null
+++ b/spec/fabricators/user_fabricator.rb
@@ -0,0 +1,5 @@
+Fabricator(:user) do
+  account
+  email    "alice@example.com"
+  password "123456789"
+end
diff --git a/spec/helpers/settings_helper_spec.rb b/spec/helpers/settings_helper_spec.rb
new file mode 100644
index 000000000..72308f30c
--- /dev/null
+++ b/spec/helpers/settings_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'rails_helper'
+
+# Specs in this file have access to a helper object that includes
+# the SettingsHelper. For example:
+#
+# describe SettingsHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       expect(helper.concat_strings("this","that")).to eq("this that")
+#     end
+#   end
+# end
+RSpec.describe SettingsHelper, type: :helper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end