Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
151 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
require 'spec_helper' | ||
|
||
describe CustomRoomsController do | ||
include Shoulda::Matchers::ActionController | ||
|
||
describe "routing" do | ||
|
||
# standard routes generated by bigbluebutton_rails | ||
it { | ||
should route(:get, "/bigbluebutton/servers/server-1/rooms"). | ||
to(:action => :index, :server_id => "server-1") | ||
} | ||
it { | ||
should route(:get, "/bigbluebutton/servers/server-1/rooms/new"). | ||
to(:action => :new, :server_id => "server-1") | ||
} | ||
it { | ||
should route(:get, "/bigbluebutton/servers/server-1/rooms/external"). | ||
to(:action => :external, :server_id => "server-1") | ||
} | ||
it { | ||
should route(:post, "/bigbluebutton/servers/server-1/rooms/external"). | ||
to(:action => :external_auth, :server_id => "server-1") | ||
} | ||
it { | ||
should route(:get, "/bigbluebutton/servers/server-1/rooms/room-1/edit"). | ||
to(:action => :edit, :server_id => "server-1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/bigbluebutton/servers/server-1/rooms/room-1"). | ||
to(:action => :show, :server_id => "server-1", :id => "room-1") | ||
} | ||
it { | ||
should route(:put, "/bigbluebutton/servers/server-1/rooms/room-1"). | ||
to(:action => :update, :server_id => "server-1", :id => "room-1") | ||
} | ||
it { | ||
should route(:delete, "/bigbluebutton/servers/server-1/rooms/room-1"). | ||
to(:action => :destroy, :server_id => "server-1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/bigbluebutton/servers/server-1/rooms/room-1/join"). | ||
to(:action => :join, :server_id => "server-1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/bigbluebutton/servers/server-1/rooms/room-1/join_mobile"). | ||
to(:action => :join_mobile, :server_id => "server-1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/bigbluebutton/servers/server-1/rooms/room-1/running"). | ||
to(:action => :running, :server_id => "server-1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/bigbluebutton/servers/server-1/rooms/room-1/end"). | ||
to(:action => :end, :server_id => "server-1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/bigbluebutton/servers/server-1/rooms/room-1/invite"). | ||
to(:action => :invite, :server_id => "server-1", :id => "room-1") | ||
} | ||
it { | ||
should route(:post, "/bigbluebutton/servers/server-1/rooms/room-1/join"). | ||
to(:action => :auth, :server_id => "server-1", :id => "room-1") | ||
} | ||
|
||
# bigbluebutton_rails room matchers inside 'user' | ||
it { | ||
should route(:get, "/users/1/room/room-1"). | ||
to(:action => :show, :user_id => "1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/users/1/room/room-1/join"). | ||
to(:action => :join, :user_id => "1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/users/1/room/room-1/join_mobile"). | ||
to(:action => :join_mobile, :user_id => "1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/users/1/room/room-1/running"). | ||
to(:action => :running, :user_id => "1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/users/1/room/room-1/end"). | ||
to(:action => :end, :user_id => "1", :id => "room-1") | ||
} | ||
it { | ||
should route(:get, "/users/1/room/room-1/invite"). | ||
to(:action => :invite, :user_id => "1", :id => "room-1") | ||
} | ||
it { | ||
should route(:post, "/users/1/room/room-1/join"). | ||
to(:action => :auth, :user_id => "1", :id => "room-1") | ||
} | ||
|
||
# our custom routes added to /users/ | ||
it { | ||
should route(:get, "/users/1/new_room"). | ||
to(:action => :user_new, :user_id => "1") | ||
} | ||
|
||
end | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require 'spec_helper' | ||
|
||
describe CustomServersController do | ||
include Shoulda::Matchers::ActionController | ||
|
||
# standard routes generated by bigbluebutton_rails | ||
describe "routing" do | ||
it { should route(:get, "/bigbluebutton/servers").to(:action => :index) } | ||
it { should route(:post, "/bigbluebutton/servers").to(:action => :create) } | ||
it { should route(:get, "/bigbluebutton/servers/new").to(:action => :new) } | ||
it { should route(:get, "/bigbluebutton/servers/server-1/edit").to(:action => :edit, :id => "server-1") } | ||
it { should route(:get, "/bigbluebutton/servers/server-1").to(:action => :show, :id => "server-1") } | ||
it { should route(:put, "/bigbluebutton/servers/server-1").to(:action => :update, :id => "server-1") } | ||
it { should route(:delete, "/bigbluebutton/servers/server-1").to(:action => :destroy, :id => "server-1") } | ||
end | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require 'spec_helper' | ||
|
||
describe HomeController do | ||
include Shoulda::Matchers::ActionController | ||
|
||
describe "routing" do | ||
pending { should route(:get, "/").to(:action => :index) } | ||
it { should route(:get, "/home/index").to(:action => :index) } | ||
end | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters