Add specs for the greater good

This commit is contained in:
Ryan Linton
2015-01-28 22:43:12 -08:00
parent e02cda5d4e
commit fe8d47ebad

View File

@@ -80,6 +80,19 @@ describe "table screens" do
@screen.tableView.tableHeaderView.should.be.kind_of UISearchBar
end
it "should not hide the search bar initally by default" do
@screen.tableView.contentOffset.should == CGPointMake(0,0)
end
it "should allow hiding the search bar initally" do
class HiddenSearchScreen < TableScreenSearchable
searchable hide_initially: true
end
screen = HiddenSearchScreen.new
screen.on_load
screen.tableView.contentOffset.should == CGPointMake(0,screen.searchDisplayController.searchBar.frame.size.height)
end
end
describe "refresh functionality" do