mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-05-30 09:20:52 +08:00
Add specs for the greater good
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user