-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored spec and implemented first spec, will implement the rest l…
…ater.
- Loading branch information
Showing
2 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# To change this template, choose Tools | Templates | ||
# and open the template in the editor. | ||
|
||
class ParkingController < ActionController::Base | ||
layout "application" | ||
def tickets | ||
@tickets = Lighthouse::Ticket.find(:all, :params => { :project_id => '50164', :q => "state:open tagged:#{params[:tag]}" }) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | ||
|
||
class ParkingController < ActionController::Base | ||
end | ||
|
||
describe ParkingController do | ||
describe "GET, index" do | ||
describe "GET, tickets" do | ||
context "requesting a list of tickets" do | ||
it "should be able to retrieve all tickets with a given tag" | ||
end | ||
|
||
context "a successful search has been requested" do | ||
it "should display a list of open tickets" | ||
end | ||
|
||
context "no tickets where found" do | ||
it "should return an empty list" | ||
it "should display a flash message" | ||
it "should do a search using the LightHouse API for tags" do | ||
Lighthouse::Ticket.should_receive(:find).with(:all, :params => { :project_id => '50164', :q => "state:open tagged:feature" }) | ||
get :tickets, {:tag => 'feature'} | ||
end | ||
end | ||
end | ||
end |