Rails-2.0.2以降から存在するBasic認証機能ですが、
この挙動をテストする方法をメモしておきます。

rails>>
request.env['HTTP_AUTHORIZATION'] =
'Basic ' + Base64::encode64("name:password")
<<--

テストコードのなかで、上記のように環境変数を設定してから
アクションを実行すればOkです。

posted by genki genki on Wed 3 Sep 2008 at 09:07 with 0 comments
Contents rssrss
光ファイバーを二次元振動させて走査するAR用ディスプレイ
因果の取り違え
Swift2's defer for CoffeeScript
mongodb-3.0からcreateIndexのdropDupsが無くなったらしい
mongodb-3.0以降のWiredTigerの設定を動的に変更する方法
一般楕円の高速生成アルゴリズムへの道標
farro mantecatoのレシピ
Droonga関連の記事のまとめ
RuntimeErrorの特定のメッセージに限定してrescueする方法
jQueryでscriptタグを実行せずにappendする
Tags
coffeescriptdefergroongajsmemonodenodejs
Comments rssrss
https://azardl.ir https://azardl.ir: در کل برای کاربرایی که در جستجو هستن پلتفرم‌... 04/30 02:42
https://xn--mgmarkt6-9db.com https://xn--mgmarkt6-9db.com: Как проверить зеркало MEGA: признаки подлинности 2... 04/30 02:33
https://58l3x5o.lomza.pl/%d9%87%d9%85%d9%87-%da%86%db%8c%d8%b2-%d8%af%d8%b1%d8%a8%d8%a7%d8%b1%d9%87-%d8%b3%d8%a7%db%8c%d8%aa-%d8%ac%d8%aa-%d8%a8%d8%aa-%d8%a7%d9%86%d9%81%d8%ac%d8%a7%d8%b1-%d8%b1%d8%a7%d9%87%d9%86%d9%85%d8%a7/ https://58l3x5o.lomza.pl/%d9%87%d9%85%d9%87-%da%86%db%8c%d8%b2-%d8%af%d8%b1%d8%a8%d8%a7%d8%b1%d9%87-%d8%b3%d8%a7%db%8c%d8%aa-%d8%ac%d8%aa-%d8%a8%d8%aa-%d8%a7%d9%86%d9%81%d8%ac%d8%a7%d8%b1-%d8%b1%d8%a7%d9%87%d9%86%d9%85%d8%a7/: بطور خلاصه برای اون دسته علاقه‌مندها بازی‌ها... 04/30 00:38
https://topdrs.ir https://topdrs.ir: سلام و عرض ادب، خودم دیروز وسط وبگردی در اینترنت ب... 04/30 00:05
https://fastesco.ir https://fastesco.ir: سلام و عرض ادب، بنده اخیرا به صورت کاملا تصادفی ... 04/29 21:11
https://example.com/jgflpvwsvw https://example.com/jgflpvwsvw: Nice blog here! Also your site loads up fast! What... 04/29 18:04
https://mohsenbelali.ir https://mohsenbelali.ir: به طور کلی برای کسانی که میخوان پلتفرم‌های ش... 04/29 13:32
https://mega555kf7lsmb54yd6etzginolhxxi4ytdoma2rf77ngq55fhfcnyid.net https://mega555kf7lsmb54yd6etzginolhxxi4ytdoma2rf77ngq55fhfcnyid.net: I love your blog.. very nice colors & theme. Did y... 04/29 11:58