summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorHannes Rosenögger <123haynes@gmail.com>2015-01-28 22:18:22 +0100
committerHannes Rosenögger <123haynes@gmail.com>2015-01-29 01:25:26 +0100
commit792ced2f4190226c3335967a8e5a30d3b72bd4ae (patch)
tree0411a2c41710a7f0d2c06fa141b8875c77873968 /spec/controllers
parent8eb365c0a04b912d2e10eb16adeeb4216563be2c (diff)
downloadgitlab-ce-792ced2f4190226c3335967a8e5a30d3b72bd4ae.tar.gz
Add a commit calendar to the user profile
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/users_controller_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb
new file mode 100644
index 00000000000..bfbe5254bbe
--- /dev/null
+++ b/spec/controllers/users_controller_spec.rb
@@ -0,0 +1,27 @@
+require 'spec_helper'
+
+describe UsersController do
+ let(:user) { create(:user, username: "user1", name: "User 1", email: "user1@gitlab.com") }
+
+ before do
+ sign_in(user)
+ end
+
+ describe "GET #show" do
+ render_views
+ before do
+ get :show, username: user.username
+ end
+
+ it "renders the show template" do
+ expect(response.status).to eq(200)
+ expect(response).to render_template("show")
+ end
+
+ it "renders calendar" do
+ controller.prepend_view_path 'app/views/users'
+ expect(response).to render_template("_calendar")
+ end
+ end
+end
+