Skip to content

Instantly share code, notes, and snippets.

View jamesbrink's full-sized avatar
💭
:trollface:

James Brink jamesbrink

💭
:trollface:
View GitHub Profile
@import <Foundation/CPObject.j>
@import "UserSessionController.j"
@import "LoginView.j"
@implementation AppController : CPObject
{
CPWindow mainWindow;
CPMenu mainMenu;
CPView contentView;
@import <Foundation/CPObject.j>
@import "UserSessionController.j"
@implementation AppController : CPObject
{
CPWindow mainWindow; //this "outlet" is connected automatically by the Cib
CPMenu mainMenu;
CPView contentView;
CPToolbar toolbar;
#This script will be run via cron to check for messages from various applications
#such as ntbackup, zmanda backup. these notifcation emmails will be parsed
#and insterted into mysql for later usage for monitoring and rrd graphs
require 'rmail'
require 'active_record'
require 'logger'
require 'date'
require 'time'
@import <Foundation/CPObject.j>
@import "UserSessionController.j"
@implementation AppController : CPObject
{
CPWindow mainWindow; //this "outlet" is connected automatically by the Cib
CPToolbar toolbar;
CPToolbarItem toolItemSearch;
CPToolbarItem toolItemUserName;
/*
* AppController.j
* Cloud-MD
*
* Created by You on March 8, 2011.
* Copyright 2011, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
- (void)doLogin:(id)sender
{
var UserSession = {
"user_session" : {
"login" : [LoginUserName objectValue],
"password" : [LoginPassword objectValue],
"remember_me" : false
}
};
var request = [[CPURLRequest alloc] initWithURL:[CPURL URLWithString: @"/user_sessions"]];
@import <CappuccinoResource/CRBase.j>
@implementation UserSession : CappuccinoResource
{
CPString login @accessors;
CPString password @accessors;
}
- (JSObject)attributes
{
return {"user_session":{"login":login, "password":password}};
require 'test_helper'
class AddressesControllerTest < ActionController::TestCase
setup do
@address = addresses(:of_patient)
@patient = patients(:one)
activate_authlogic
end
test "patient addresses index without user" do
require 'test_helper'
class PatientsControllerTest < ActionController::TestCase
setup do
@patient = patients(:one)
activate_authlogic
end
test "patient actions without user" do
PatientsController.action_methods.each do |action|
require 'test_helper'
class PatientsControllerTest < ActionController::TestCase
setup do
@patient = patients(:one)
end
test "actions without user" do
PatientsController.action_methods.each do |action|
get action