Remove v0 version namespacing for API
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Api::V0::PlaylistsController do
|
||||
describe Api::PlaylistsController do
|
||||
before do
|
||||
controller.current_user = Factory.create(:user)
|
||||
end
|
@@ -1,6 +1,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Api::V0::SessionsController do
|
||||
describe Api::SessionsController do
|
||||
describe 'POST create' do
|
||||
let(:user) { Factory.create(:user) }
|
||||
|
@@ -4,7 +4,7 @@ feature 'API sign in' do
|
||||
let(:user) { Factory.create(:user) }
|
||||
|
||||
def do_create
|
||||
post api_v0_sessions_path, :format => :json, :session => {
|
||||
post api_sessions_path, :format => :json, :session => {
|
||||
:email => user.email,
|
||||
:password => user.password
|
||||
}
|
@@ -18,7 +18,7 @@ feature 'API cross origin request' do
|
||||
# FIXME: request without redirect
|
||||
request_via_redirect(
|
||||
:options,
|
||||
api_v0_playlists_path(:format => :json),
|
||||
api_playlists_path(:format => :json),
|
||||
nil,
|
||||
{ 'Origin' => origin }
|
||||
)
|
||||
@@ -33,7 +33,7 @@ feature 'API cross origin request' do
|
||||
|
||||
scenario 'basic request' do
|
||||
# FIXME: replace with a more stable/generic action
|
||||
get api_v0_playlists_path(:format => :json), nil, {
|
||||
get api_playlists_path(:format => :json), nil, {
|
||||
'Origin' => origin
|
||||
}
|
||||
|
||||
|
@@ -2,10 +2,10 @@ require 'spec_helper'
|
||||
|
||||
describe '/api OPTIONS requests routing' do
|
||||
it 'routes to Api::ApplicationController#cor_preflight' do
|
||||
{ :options => '/api/v0' }.should route_to(
|
||||
{ :options => '/api/some_route' }.should route_to(
|
||||
:controller => 'api/application',
|
||||
:action => 'cor_preflight',
|
||||
:all => 'v0'
|
||||
:all => 'some_route'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user