Base progress

This commit is contained in:
2015-09-16 11:50:55 +02:00
parent ef894f9e02
commit 6a085b1ca2
52 changed files with 3686 additions and 1818 deletions
@@ -2,6 +2,7 @@ step 'there is a confirmed and open supplier' do
@supplier_password = 'secret1'
@employee_password = @supplier_password
@employee = create :employee, email: 'supplier@mozo.bar', password: @supplier_password
binding.pry
@supplier = build :supplier, open: true
@supplier.add_manager @employee
@section = create :section, title: 'Room', supplier: @supplier, width: 8, height: 8
@@ -1,5 +1,5 @@
step "the user is on the active list page" do
visit "/user#/active_list"
user_visit "active-list"
end
step "the user should see the order in the active list view" do
+14
View File
@@ -0,0 +1,14 @@
require 'spec_helper'
describe "persistance" do
let(:db){CouchPotato.database.couchrest_database}
let(:db_uri){ File.join(db.host, db.name)}
describe "database format" do
it "persists with proper ruby class" do
employee = create :employee
response = Net::HTTP.get URI(File.join(db_uri, employee.id))
response.should include %|"ruby_class":"Employee"|
response.should_not include %|"id":|
end
end
end
+5
View File
@@ -21,6 +21,11 @@ module Features
submit_form
end
def user_visit(path)
#visit File.join("http://localhost:3/")
visit File.join("/user#", path)
end
def login_employee_as(email)
visit "/employees/sign_in"
fill_in "employee_email", with: email