#192: refactoring of specs

This commit is contained in:
Vokhmin Alexey V 2013-07-04 16:44:48 +04:00
parent 0c926e850c
commit 507a574fd1
1 changed files with 3 additions and 3 deletions

View File

@ -120,14 +120,14 @@ describe ApiDefender do
end
end
context 'for allowed_addresses' do
context 'for allowed addresses' do
let(:remote_addr) { APP_CONFIG['allowed_addresses'].first }
it "should not return the limit usage for allowed address" do
it 'should not return the limit usage for allowed address' do
get "/api/v1/users/#{@user.id}.json", {}, {'REMOTE_ADDR' => remote_addr }
response.headers['X-RateLimit-Limit'].should_not == @rate_limit.to_s
end
it "should not forbidden allowed address" do
it 'should not forbidden allowed address' do
(@rate_limit+1).times { get "/api/v1/users/#{@user.id}.json", {}, {'REMOTE_ADDR' => remote_addr } }
response.status.should == 200
end