describe "author search" do
before(:each) do
@book1 = BookInStock.new("1111", "title1","author1", "genre1", 11.1,11)
@book2 = BookInStock.new("2222", "title2","author1", "genre2", 22.2,22)
end
context "required book in the database"do
it "puts book in both remote cache and localcache" do
expect(@sqlite_database).to receive(:authorSearch).with('author1').and_return(@book1,@book2)
expect(@dalli_client).to receive(:get).with('author1_Statement').and_return(nil)
expect(@dalli_client).to receive(:get).with('author1_Statement').and_return(nil)
expect(@dalli_client).to receive(:get).with('bks_author1').and_return(nil)
#expect(@data_access).to receive(:each).with(@book1).and_return('1111_')