summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/app/models/user.rb3
-rw-r--r--users/test/integration/api/rack_test.rb12
2 files changed, 14 insertions, 1 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb
index c9b367f..62c5054 100644
--- a/users/app/models/user.rb
+++ b/users/app/models/user.rb
@@ -47,7 +47,8 @@ class User < CouchRest::Model::Base
timestamps!
design do
- load_views(Rails.root.join('users', 'app', 'designs', 'user'))
+ own_path = Pathname.new(File.dirname(__FILE__))
+ load_views(own_path.join('..', 'designs', 'user'))
view :by_login
view :by_created_at
end
diff --git a/users/test/integration/api/rack_test.rb b/users/test/integration/api/rack_test.rb
new file mode 100644
index 0000000..da960f2
--- /dev/null
+++ b/users/test/integration/api/rack_test.rb
@@ -0,0 +1,12 @@
+CONFIG_RU = (Rails.root + 'config.ru').to_s
+OUTER_APP = Rack::Builder.parse_file(CONFIG_RU).first
+
+class RackTest < ActiveSupport::TestCase
+ include Rack::Test::Methods
+ include Warden::Test::Helpers
+ include LeapWebCore::AssertResponses
+
+ def app
+ OUTER_APP
+ end
+end